Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WM_QUIT message

Indicates a request to terminate an application, and is generated when the application calls the PostQuitMessage function. This message causes the GetMessage function to return zero.


#define WM_QUIT                         0x0012

Parameters

wParam

The exit code given in the PostQuitMessage function.

lParam

This parameter is not used.

Return value

Type: LRESULT

This message does not have a return value because it causes the message loop to terminate before the message is sent to the application's window procedure.

Remarks

The WM_QUIT message is not associated with a window and therefore will never be received through a window's window procedure. It is retrieved only by the GetMessage or PeekMessage functions.

Do not post the WM_QUIT message using the PostMessage function; use PostQuitMessage.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
GetMessage
PeekMessage
PostQuitMessage
Conceptual
Windows

 

 

Show:
© 2017 Microsoft