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

user808066 picture user808066 · Jun 22, 2011 · Viewed 41.4k times · Source

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 way to do this, or are there any good tutorials that can explain this from the very basics?

Answer

Felice Pollano picture Felice Pollano · Jun 22, 2011

In windows look at the following API:

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.