.bmp file data to HBITMAP, How ?
-
Hi, I've a bitmap file binary data in variable (File contents read from a .bmp file). How can i convert it to an HBITMAP? I know One way is to save the contents in to a file and use LoadImage() method. Is there any other way to do the same in memory ?
Thanks & Regards
-
Hi, I've a bitmap file binary data in variable (File contents read from a .bmp file). How can i convert it to an HBITMAP? I know One way is to save the contents in to a file and use LoadImage() method. Is there any other way to do the same in memory ?
Thanks & Regards
Check out CxImage[^], it can probably do it. You can also try experimenting with CreateDIBSection[^] or you can try the Gdiplus Bitmap::FromStream[^] + CreateStreamOnHGlobal[^] + Bitmap::GetHBITMAP[^] method.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
Hi, I've a bitmap file binary data in variable (File contents read from a .bmp file). How can i convert it to an HBITMAP? I know One way is to save the contents in to a file and use LoadImage() method. Is there any other way to do the same in memory ?
Thanks & Regards
Hey, Check out this MSDN arcticle on creating a bitmap in memory (inside a device context). Capturing an Image[^] Hope that gets you started. Best Regards, MicroVirus