Hi,
I need to convert a System.Drawing.Bitmap into a GDI bitmap, store the GDI
bitmap, and then later display it using BitBlt.
The storing part is giving me a little trouble.
Given a paint event, I can happily create a Bitmap, call
GetHBitmap()->ToPointer on it, and then SelectObject the resulting pointer
in a DC and display it into the Graphics object from PaintEventArgs.
However, storing it for a while and then trying to display isn't having such
happy results. Which leads me to believe that I'm doing something that means
the GDI pointer isn't valid, and the case above is working as a fluke.
There's also no code I can find which does any more than converting a
System.Drawing.Image to a GDI bitmap, displays it, and releases the GDI
object, which isn't going to work for me because the conversion is
prohibitively slow. And having never worked in GDI (and now realising why),
this is causing some frustration. Any help would really be appreciated!
Steve