void PostQuitMessage(nExitCode) | ||||
int nExitCode; | /* exit code, */ |
The PostQuitMessage function posts a message to Windows indicating that an application is requesting to terminate execution (quit). This function is typically used in response to a WM_DESTROY message.
nExitCode
Specifies an application-defined exit code. It must be the wParam parameter of the WM_QUIT message.
This function does not return a value.
The PostQuitMessage function posts a WM_QUIT message to the application and returns immediately; the function simply indicates to the system that the application will request to quit some time in the future.
When the application receives the WM_QUIT message, it should exit the message loop in the main function and return control to Windows.