I've tested using MSDN but I haven't had any luck there.
What I want to do is to wait for the PrintScreen button( on the
keyboard ) to be pressed and then do something.
And I want to do this without eating all the CPU power I can get.
I've so far been succesfull with stopping the program with this code
chunk :
But now I also want to continuesly check if the button has beenCode:#include <windows.h> int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WaitForSingleObject( GetCurrentProcess() , INFINITE ); return 0; }
pressed.
I heard from someone that I should use the following functions :
CreateThread
WaitForMultipleObjects
SetWindowsHookEx (where I should use a keyboard hook)
but i don't know how to implement this.



LinkBack URL
About LinkBacks


