Is there any way I can save a HDC to a file such as a .gif, .bmp, .jpg or anything else along that line? In VB there is a function SavePicture. Is there anything like this for C++?
thx in advance
Printable View
Is there any way I can save a HDC to a file such as a .gif, .bmp, .jpg or anything else along that line? In VB there is a function SavePicture. Is there anything like this for C++?
thx in advance
It's a lot more complex than calling Picture1.SavePicture...
Here is a discussion - note that some functions the poster refers to are in another post on the same board. They are code he wrote - like WRITEtoDIB()
http://codeguru.earthweb.com/bitmap/..._to_file.shtml
It's quite easy with GDI+.
You limit your options a bit there, though.
Yes, that is true. But not more than SaveImage would do.
True.
is there a way to do this without MFC?
GDI+ != MFC.
You can do it, you just need to use a memory DC, then save the data to a DIB file :)
MSDN is your friend...
could u give me the link to find this on msdn?