-
CImage to HBITMAP
Hello,
I have problem with this code:
Code:
CImage tmpImg;
HRESULT hResult = tmpImg.Load(L"C:\\img-1.gif");
tmpImg.Create(tmpImg.GetWidth(), tmpImg.GetHeight(), tmpImg.GetBPP());
and the problem is that assert m_hBitmap == 0 fails.
I just need to create real HBITMAP from CImage without casting (CImage::operator HBITMAP()).
Thank you for help!
-
Re: CImage to HBITMAP
Load and Create after this - too much for the same CImage instance. tmpImg is ready for use after Load, why do you need Create?
-
Re: CImage to HBITMAP
well what I really try to do is insert gif image into rich edit control and I need somehow to convert gif into bitmap.
http://www.codeguru.com/cpp/controls...cle.php/c2417/ - here's the code for inserting images in rich edit for bitmaps