jimstar
asked on
Text from clipboard to char array
I want to grab a string from the clipboard in Windows and copy it to a char array for further processing. If some other data is on the clipboard, I wouldn't want that returned (such as a picture, file, etc)... just a simple "if there is text on the clipboard, copy it to my variable".
I'm going to have users copy text to the clipboard from a travel website and then process that data in my application.
Does anyone have any example code for this simple task of moving text from the clipboard to a variable? I'm using Visual C++ and no MFC.
I'm going to have users copy text to the clipboard from a travel website and then process that data in my application.
Does anyone have any example code for this simple task of moving text from the clipboard to a variable? I'm using Visual C++ and no MFC.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
is OpenClipboard and GetClipboardData for checking the content type of the clipboard
you want to check the CF_XXXX constants.
you'll find examples about the Clipboard e.g here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard.asp
Regard
Friedrich