-
March 6th, 2009, 05:01 AM
#1
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:perator HBITMAP()).
Thank you for help!
-
March 6th, 2009, 07:24 AM
#2
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?
-
March 6th, 2009, 08:30 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|