Archived

This topic is now archived and is closed to further replies.

thuned

how do i draw a DIB onscreen in mfc?

Recommended Posts

thuned    122
i tried searching the web and msdn but the stuff i found requires a handle to both the bitmap and a pallete? i''m getting a (long*) to a DIB and i don''t know what to do with it. this is where i''m getting the DIB from http://www.microsoft.com/devonly/tech/amov1doc/amsdk040.htm#if_0001050106030e00 thuned

Share this post


Link to post
Share on other sites
Brannon    122
Well, if you want to blit a bitmap in Win32, then you should have the following 2 things:

Handle to DIB
DC that you want to blit to.

So, using the DIB and the DC you can call SetDIBitsToDevice to render the bitmap to the DC.


-Brannon

Share this post


Link to post
Share on other sites
thuned    122
yeah, but all the function returns is a (long*) which which is "output image pointer is filled with the entire DIB image, including the Microsoft Win32 BITMAPINFOHEADER structure, any required palette, and bit masks as defined in the Win32 BITMAPINFO structure"
how do i get a handle from that?

Share this post


Link to post
Share on other sites