WM_QUERYENDSESSION

2.x

WM_QUERYENDSESSION

The WM_QUERYENDSESSION message is sent when the user chooses to end the Windows session, or when an application calls the ExitWindows function. If any application returns zero, the Windows session is not ended. Windows stops sending WM_QUERYENDSESSION messages as soon as one application returns zero and sends WM_ENDSESSION messages, with the wParam parameter set to FALSE, to any applications that have already returned nonzero.

Parameters

This message has no parameters.

Return Value

An application should return nonzero if it can conveniently terminate; otherwise, it should return zero.

Comments

The DefWindowProc function returns nonzero when it processes this message.

See Also

DefWindowProc, ExitWindows, WM_ENDSESSION