Detecting Windows/App Shutdown/Logoff
The Lounge
1
Posts
1
Posters
0
Views
1
Watching
-
Hi Guys, having trouble detecting: 1 if user is trying to close my app 2 if user is logging off or shutting down windows (NT) i need to check for certain things in my app b4 the above can happen. i've tried adding: void CMainFrame::OnEndSession(BOOL bEnding) { CMDIFrameWnd::OnEndSession(bEnding); // TODO: Add your message handler code here } BOOL CMainFrame::OnQueryEndSession() { if (!CMDIFrameWnd::OnQueryEndSession()) return FALSE; // TODO: Add your specialized query end session code here return } ... doesn't get any messages is there any way to trap the 'shutdown' messages from windows., MSDN is a lot of help... ENDSESSION_LOGOFF: WM_ENDSESSION : WM_QUERYENDSESSION: Any help appreciated Thanks