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
Printable View
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);
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
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
that exit(1) from stdlib.h worked thanks :)