How to copy an image file into clipboard?

I need a C++/C code example that demonstrates how to copy a 24-bit bmp picture file on the computer/disk into the clipboard.
I am working with a Visual C++ Win32 console application on Windows 7.
1
2
3
4
5
6
7
8
OpenClipboard();
EmptyClipboard();
?
hMem =  GlobalAlloc(GMEM_MOVEABLE, ?);
memcpy(GlobalLock(hMem), ?, ?);
GlobalUnlock(hMem);
SetClipboardData(CF_DIB, hMem);
CloseClipboard();

Thanks to anyone that helps.
Last edited on
Topic archived. No new replies allowed.