My problem is very clear: I have an HDIB handle to a device independent bitmap.I want to be able to get an HBITMAP handle to a BITMAP object from it.
Until now, my only solution was to do the following:
- create a Memory DC compatible with the display memDC.CreateCompatibleDC(NULL);
- select a bitmap object that has the properties we want
- create a bitmap object compatible with the current one:
- select it into memDC
- copy PIXEL by PIXEL the DIB object from my DIB class (which has a GetPixel() function):
Well, you can see that it is not very good, especially not FAST.
I'd like to get the the bitmap filled with the DIB bits directly, with some
kind of bitblt function.
SO: how do I get a bitmap from an HDIB?
I need code because I'm late in my project.
Thanks a lot.