I want to convert gdi+ Bitmap into gdi object HBitmap.
I am using the following method:
Bitmap* img = new Bitmap(XXX); // lots of codes... HBITMAP temp; Color color; img->GetHBITMAP(color, &temp);
the img object is drawing on a dialog.
when this part of method is called, strange thing happens!
the img displaying in the window changed!
It become a bit clearer or sharper.
My question is what happens?
The bitmap pixel format may be the reason. Do you specify it explicitly in the Bitmap constructor?
Try making sure that all the pixel formats you use are the same.
Another reason may be the differences in
Gdiplus::Graphicsinterpolation modes in your code. That attribute determines how the images are resized, how the lines are drawn, etc.