I trying to find any solution from 2 days, but i didn't find anything usefull. I need to close my app from aplication code with returning value. I know, i need to use ExitInstance, it's work's fine but only when i add window and press X to close my app. I need to force my app to close from code (something like to fore ExitInstance). Any solutions?
Asked
Active
Viewed 1,408 times
1 Answers
4
Use the PostQuitMessage function, passing an appropriate exit code as its only argument, i.e.
PostQuitMessage(0); //Everything went fine
or
PostQuitMessage(-1); //Troubles occurred

p-a-o-l-o
- 9,807
- 2
- 22
- 35