Saving a BITMAP
-
Hi all, I have created a (very simple) bitmap editing program with a dialog based MFC project. Everything seems in order so far but I don't know how to save the HBITMAPs that I have created to file. I have tried using snippets of code from other examples but to no avail. Any help would be much appreciated :-D
-
Hi all, I have created a (very simple) bitmap editing program with a dialog based MFC project. Everything seems in order so far but I don't know how to save the HBITMAPs that I have created to file. I have tried using snippets of code from other examples but to no avail. Any help would be much appreciated :-D
-
Hi all, I have created a (very simple) bitmap editing program with a dialog based MFC project. Everything seems in order so far but I don't know how to save the HBITMAPs that I have created to file. I have tried using snippets of code from other examples but to no avail. Any help would be much appreciated :-D
If it is a DDB(device dependent bitmap) use GetDIBits(...) on the HBITMAP and get the DIB with the format of your choice specified via the BITMAPINFO. Once got the DIB bits, you can save to the file by putting the BITMAPFILEHEADER,BITMAPINFO and the bits itself to a file in that sequence. Vipin - MVP
-
Hi all, I have created a (very simple) bitmap editing program with a dialog based MFC project. Everything seems in order so far but I don't know how to save the HBITMAPs that I have created to file. I have tried using snippets of code from other examples but to no avail. Any help would be much appreciated :-D
Here is the link of codeproject that may help you for saving the bitmap. http://www.codeproject.com/bitmap/drawing2bitmap.asp Thanks and Regards Laxman FAILURE is the first step towards SUCCESS :cool: