WMQUIT
WMQUIT, more commonly known as WM_QUIT, is a Windows message code used to signal termination of a thread’s message loop. It is not a message sent to a window procedure; instead, it is posted to the thread’s message queue to indicate that the thread should exit.
The WM_QUIT value is 0x0012 (18 decimal). It is posted by the function PostQuitMessage, which takes an
Usage typically involves a message loop that runs until WM_QUIT is received. A common pattern is:
GetMessage(&msg, NULL, 0, 0) > 0, then TranslateMessage(&msg); DispatchMessage(&msg); After the loop exits, the program often returns
A key distinction is that WM_QUIT is thread-level and not delivered to window procedures. It is one
See also: WM_QUIT semantics, PostQuitMessage, GetMessage, message loops in Win32 programming.