◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── afx_msg BOOL OnQueryEndSession(); Remarks Called when the user chooses to end the Windows session or when an application calls the ◄ExitWindows► Windows function. If any application returns FALSE, the Windows session is not ended. Windows stops calling OnQueryEndSession as soon as one application returns FALSE, and sends the ◄WM_ENDSESSION► message with a parameter value of FALSE for any applications that have already returned TRUE. This message-handler member function calls the ◄Default► member function. Override this member function in your derived class to handle the ◄WM_QUERYENDSESSION► message. Return Value An application should return TRUE if it can be conveniently shut down; otherwise FALSE. See Also ◄CWnd::Default►, ◄::ExitWindows►, ◄CWnd::OnEndSession►, ◄WM_QUERYENDSESSION► -♦-