Skip to content
Search

WindowsApi:WM QUIT

lastmod 2018-08-17created 2016-04-072 edits

A signal to terminate the application. It is generated by a call to the PostQuitMessage function and ends the message loop by making the GetMessage function return 0.

In other words, the PostQuitMessage() function puts WM_QUIT into the message queue, which ends the message loop in WinMain(), terminates the WinMain() function itself, and returns control to the operating system.

Destroy vs Quit vs Close

When the user clicks the [X] button, the calls happen in the order WM_CLOSE -> WM_DESTROY -> WM_QUIT.

See also

Favorite site