Get System Shutdown notification
C / C++ / MFC
3
Posts
2
Posters
0
Views
1
Watching
-
Hello all, Please tell me how to get window shutdown notification in my MFC application? -Cvaji
-
I know about WM_QUERYENDSESSION Please tell me whether I can suspend the whole shutdown process when I receives this message and whether I can resume/cancel the shutdown process.
I think you cannot suspend the shutdown process, but you can cancel it returning FALSE to the WM_QUERYENDSESSION message. Maybe, while you are in your WM_QUERYENDSESSION message handler, the shutdown process is suspended, except when ExitWindowsEx was called with the flag EWX_FORCEIFHUNG, but I'm not sure about that.