I need some help. I cant figure this simple command out.

All i need to do is have my program end at any point by pressing CTRL-c and I can't figure it out can someone please help me
Combinations with special characters is a little more involved but here is the function: GetAsyncKeyState()

Hmmmmm and here is the line:

1
2
3
4
if ( GetAsyncKeyState ( control ) && GetAsyncKeyState ( 'c' ) ) 
{
    CloseProgram();
}


U'll have to look up what those keys are, i think VK_CTRL maybe. 'c' u may have to find the ascii value. If control doesnt work try it with just 1 regular character.
If your program is running in the Windows command prompt, pressing Ctrl + C will automatically close it by default.
its not closing it. i need code
Topic archived. No new replies allowed.