Correct way to copy HBITMAP handle
-
I have a DLL function that gives an HBITMAP back to the calling application. I would like to store this off in a separate variable for use in WM_PAINT messages. What is the proper way to copy off this handle? I suppose I could copy into a memory DC, then extract it again, but that seems like too much work just to copy the bitmap data. Is there another way?
-
I have a DLL function that gives an HBITMAP back to the calling application. I would like to store this off in a separate variable for use in WM_PAINT messages. What is the proper way to copy off this handle? I suppose I could copy into a memory DC, then extract it again, but that seems like too much work just to copy the bitmap data. Is there another way?
Your DLL can create the GDI bitmap object once, then keep returning the same
HBITMAP
over and over, no copying needed. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- I even hear the Windows "OMG I booted up fine" sound. -- Paul Watson diagnosing hardware problems.