CWnd::OnEndSession

Syntax

afx_msg void OnEndSession( BOOL bEnding );

Parameters

bEnding

Specifies whether or not the session is being ended. It is TRUE if the session is being ended; otherwise, it is FALSE.

Remarks

Called after the CWnd has returned TRUE from a OnQueryEndSession member function call. The OnEndSession call informs the CWnd whether the session is actually ending.

If bEnding is TRUE, Windows can terminate any time after all applications have returned from processing this call. Consequently, have an application perform all tasks required for termination within OnEndSession.

CWnd does not need to call the DestroyWindow member function or PostQuitMessage Windows function when the session is ending.

This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_ENDSESSION message.

See Also

CWnd::DestroyWindow, ::ExitWindows, ::PostQuitMessage, WM_QUERYENDSESSION, CWnd::Default, WM_ENDSESSION