How To Take Desktop Snap-Shots

What is the way to write a c++ code which takes a desktop snap-shot similar to Windows 7's Snipping Tool ?

For example, copy a pic of the desktop:
x: 50-100
y: 30-80
to bla.jpg ?

Is there a function which copies a pixel by a given (x,y) ?
Most likely, but you're not going to find a function for it in the standard library.

What operating system are you writing this for?

-Albatross
closed account (3pj6b7Xj)
I know how to do it but man oh man it takes a lot of code...

You first have to create a compatible DC, then handle to a bitmap, then you select the bitmap handle into the DC...when i say create a compatible DC the DC that is created points to screen, then you use bitblt to copy the information from the DC into the bitmap and then ... I don't, you can do what ever you like with it after that...bottom line is, there are several steps required, i'm at a friends computer so when I get over to mine, I'll just post my screen capture class...just know that I don't work on it anymore.
Hey, can you please post the example you were talking about ?
closed account (D80DSL3A)
I guess mrfaosfx forgot where this thread was...
http://www.cplusplus.com/forum/windows/33450/
Thanks man, I asked for it and I will check to see how it works.. ! :)
Topic archived. No new replies allowed.