Waiting for PrintScreen to be pressed
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
But now I also want to continuesly check if the button has been
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
WaitForSingleObject( GetCurrentProcess() , INFINITE );
I heard from someone that I should use the following functions :
SetWindowsHookEx (where I should use a keyboard hook)
but i don't know how to implement this.