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

后端 未结 5 1854
情话喂你
情话喂你 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:20

    In windows look at the following API:

    • OpenClipBoard
    • EmptyClipboard
    • SetClipboardData
    • CloseClipboard
    • GetClipboardData

    An extensive discussion can be found here. Obviously this topic is strongly operating system related. And if you are using some framework (ie MFC/ATL) you generally find some helper infrastructure. This reply refer to the lowest API level in WIndows. If you are planning to use MFC have a look here, if you prefer ATL look here.

提交回复
热议问题