SetClipboardData needs the memory set to exist on the heap (and in my experience - often best to use the default process heap as opposed to one of the runtime heaps used with new or malloc)
Originally posted by void
I've tried several things.. but i keep getting errors in the SetClipboardData() line.
The problem I have is when trying to add Strings to it.
does not work obviously
I suppose I have to cast the string or something, or maybe do something with pointers.. Please help..
using namespace std;
string strBuff = "Hello World";
cout << "Error opening clipboard";
LPVOID lpv =
cout << "Error getting memory";
cout << "Error Setting data";