by synergyfocus >> Thu, 5 Jun 2003 0:11:02 GMT
Hi,
Does anyone know how to retrieve a bitmap from the clipboard and place in in a picture control?
I have got so far and now become stuck... Heres what I have got so far :
call openClipboard(null);
//opens the clipboard
write call isClipboardFormatAvailable(CF_BITMAP); //check for me just to ensure the type of data on the clipborad is a bitmap
handle := call getClipboardData(CF_BITMAP); //gets the handle to data stored on the clipboard
locked := call globalLock(handle);
//locks the data ready to retrieve it
What goes in here...!??!??!
call globalUnlock(locked);
//releases the lock
call closeClipboard;
//close the clipboard
I can't figure out how to now copy the data to my picture control.
Any ideas??
External functions are :
openClipboard(hwnd :Integer): Integer is OpenClipboard in user32; isClipboardFormatAvailable(format: Integer): Integer is IsClipboardFormatAvailable in user32;
getClipboardData(format: Integer): Integer is GetClipboardData in user32; globalLock(handle: Integer): Integer is GlobalLock in kernel32; globalUnlock(handle :Integer): Integer is GlobalUnlock in kernel32; closeClipboard(): Integer is CloseClipboard in user32;
Thanks
Stephen Persson