Click to See Complete Forum and Search --> : blitting bitmap to window


xargon
November 26th, 2005, 05:53 PM
Hi everyone,

I have a question about blitting a bitmap to a windows device context (DC).

I have a third party control that gives me pointers to the BITMAPINFO structure and a pointer to the actual BITMAP pixels. My question is what is the fastest way to blit this bitmap to a window control in pure Win32 API (MFC free basically).

Thanks and cheers,
xarg

golanshahar
November 27th, 2005, 02:25 AM
Hi everyone,

I have a question about blitting a bitmap to a windows device context (DC).

I have a third party control that gives me pointers to the BITMAPINFO structure and a pointer to the actual BITMAP pixels. My question is what is the fastest way to blit this bitmap to a window control in pure Win32 API (MFC free basically).

Thanks and cheers,
xarg

you can use ::SetDIBitsToDevice(..) (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_8e5h.asp) to do it.

look at those threads i posted samples of how to use ::SetDIBitsToDevice()

Video from Desktop (http://www.codeguru.com/forum/showthread.php?t=351387)
Changing colors on a bitmap (http://www.codeguru.com/forum/showthread.php?t=348023)


Cheers

ovidiucucu
November 27th, 2005, 05:47 AM
[ Redirected thread ]