How do you copy/paste from the clipboard in C++?

后端 未结 5 1865
情话喂你
情话喂你 2020-12-03 07:30

I\'m still a C++ newbie who has only recently learned some file manipulation. I looked it up online and the codes given are way beyond my current skill. Is there a simple wa

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 08:06

    There is no cross-platform way to do this in C++


    Now that we have that out of the way, Felice Pollano's answer provides the Windows API so you can manipulate the clipboard in Windows.

    Apple provides an example application named ClipboardViewer and an entire reference to the NSPasteBoard and the functionality it provides.

    As for Linux, it depends on what windowing manager you are running.

提交回复
热议问题