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 ;)
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 ;)
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.
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.
Iczelion has the answer, or at least most of it: see here.
gorshing
thanks for trying to help me.
and Frank, Thank you
it works perfect now.
thanks for trying to help me.
and Frank, Thank you
it works perfect now.
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:
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:
Looks like I was a little off ;)
Oh well ... no harm, no foul
:cool:
Oh well ... no harm, no foul
:cool: