Hi
I have a program that runs but when i press a certian key command i want the whole program to end.
at the moment it just closes the window
can anyone help how to terminate the whole program?
Thanks
Hi
I have a program that runs but when i press a certian key command i want the whole program to end.
at the moment it just closes the window
can anyone help how to terminate the whole program?
Thanks
ExitProcess(1);
"The Internet treats censorship as damage and routes around it." - John Gilmore
Hi
i have used that and it doesnt end my program but causes a problem when it ends.
this is the code i am using
Code:case VK_ESCAPE: // If the user press Ctrl + Alt + Delete if( VK_ESCAPE &&Shift.Contains(ssCtrl&& ssAlt )) break; } ExitProcess(1);}
Describe in more detail what happens.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
it pauses the program opens the CPU box and says that there is a "access violation"
There are a number of conditions with the application of ExitProcess()
http://msdn2.microsoft.com/en-us/library/ms682658.aspx
Is there any reason you can't use exit(1) from stdlib.h?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
that exit(1) from stdlib.h worked thanks