is it possible to do?

Aug 6, 2008 at 9:21pm
Hi, everybody,
From C++ program is it possible
- to make a screenshot ( the same thing that "printscreen" button does )
- to access the computer clipboard somehow,
- to set computer's date and time
- to start a system program ( "Paint", for instance )
- to end a system program ( like "Paint" ) ?

If any of those is possible, where can I learn how to do that?
My system is Windows XP.
Thank you.

Last edited on Aug 6, 2008 at 9:24pm
Aug 6, 2008 at 9:54pm
Google is your friend.

screen snapshot c++
c++ windows clipboard
c++ set system date time windows
c++ execute another program
msdn createprocess

The last one is a bit trickier to find information on. You'll need information you get from the CreateProcess() function. Post a WM_CLOSE message to the child window to ask it to terminate. You can use WaitForSingleObject() to wait a moment, then force it to terminate with a WM_QUIT message.

Good luck!
Aug 7, 2008 at 4:30am
Thank you, Duoas!
Aug 7, 2008 at 10:44am
No problem. Post back if you need more help with any of those.
Aug 7, 2008 at 2:53pm
All the code is in MSDN (really basic apis...)
And "is it possible " has no sense, since everything is possible with Win32 api.
Aug 7, 2008 at 5:36pm
Please don't give beginners a hard time for wanting to learn something. Before too long he'll know just where and how to look for things he wants as well as you or I can.
Aug 7, 2008 at 7:45pm
george: Do you work for Microsoft? Def sounds like it.
Aug 8, 2008 at 6:29am
No, I just use Win16-Win32 api since Win 2.0, Win 3.0, 3.1, Win 9x, etc...
Topic archived. No new replies allowed.