Hello

All day i have beein searching for some code to take a screenshot of everything of the screen and save it to like C:\Pictures.
I should save it as .BMP.

actully i want to save alot of pictures in just a short time
pic001.bmp
pic002.bmp
pic003.bmp
etc etc
but how to do that i probably solve by my self ;)
Posted on 2004-03-08 10:59:42 by bj1500
I don't have the exact steps to do this.

So this is me taking a shot in the dark....

I would call GetDesktopWindow() to get the HANDLE to the desktop.

Then, GetDC() would get me the handle to the DeviceContext.

Using that I think it is possible to create another DC that is compatible with your desktop, so basically making another bitmap that is the same size ... that is CreateCompatibleDC.

I'm kind of stuck here, but you would need to copy the desktop DC to the one you created and then save that out to a bmp ... of course.

Be sure to release the DC though.

Sorry I wasn't of any more help.
Posted on 2004-03-08 13:27:15 by gorshing
Iczelion has the answer, or at least most of it: see here.
Posted on 2004-03-08 14:41:44 by Frank
gorshing

thanks for trying to help me.
and Frank, Thank you
it works perfect now.
Posted on 2004-03-08 15:15:50 by bj1500
I have no idea what i'm about to say, but i make a lucky guess :tongue::
If you want to take the screenshot manually, i guess you could use the print screen button from the keyboard, and as you know; windows takes a screenshot and saves it to clipboard. Then you can propably access it with GetClipboardData -func, with CF_BITMAP flag.. :confused:
Posted on 2004-03-09 11:35:44 by Petroizki
Looks like I was a little off ;)

Oh well ... no harm, no foul

:cool:
Posted on 2004-03-09 13:16:41 by gorshing