From: Tor Lillqvist <tml@ik...> - 2009-03-03 17:47:02
> it possible with MinGW copyng the contents of
> Windows clipboard into a string.
Wrong question. MinGW is a compiler (and linker, etc) to build
programs that run on Windows. And yes, of course it is possible to
copy the contents of the Windows clipboard into a string. What would
be the point with the clipboard otherwise? What compiler you use is
more or less irrelevant.
Read Microsoft's documentation on MSDN.
> Do you have examples of code?
This is a trivial command-line program to manipulate the clipboard.
Mostly written as a test tool, but feel free to rip out code as
That might be a bit too complex though, basically what you want is
just OpenClipboard(NULL) followed by p=GetClipboardData(CF_TEXT) and
then CloseClipboard(). Note that the CF_TEXT clipboard format returns
text in system codepage. That you have to ask this question in the
first place probably means you are not interested in the slight
additional complexity of using Unicode though;)
Get latest updates about Open Source Projects, Conferences and News.