Hey Everyone!
How are the projects going?
Straight to the point:
I have certain data in memory and formatted as a Device Independent Bitmap (DIB), specifically said data is on the clipboard memory.
What I need to achieve is a way to use that data as a texture and apply it to a previosly displayed scenenode.
I've been looking in here and reading the API but I can't seem to find a way to do it; also, I DON'T care if the way to do it is platform dependent...
I lost platform independency a while ago, so it's ok to use WIN related methods...
Any idea or any place I should be looking?
Any clue will be very much appreciated.
Importing image from Clipboard to Texture
That's how you access the clipboard:
However, there are different formats (other than CF_TEXT):
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
So maybe some image format is helpful.
Finally, you will probably have to copy the data to a texture using lock() / unlock().
Code: Select all
HANDLE clip;
if (OpenClipboard(NULL))
{
clip = GetClipboardData(CF_TEXT);
CloseClipboard();
}
string text = (char*)clip;
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
So maybe some image format is helpful.
Finally, you will probably have to copy the data to a texture using lock() / unlock().
Never take advice from someone who likes to give advice, so take my advice and don't take it.