Should I process WM_ENDSESSION, WM_QUERYENDSESSION, both or neither?
问题 If a system is trying to shut down, an app can block this shutdown by overriding OnQueryEndSession() and returning FALSE . Surely that means WM_ENDSESSION is the only definitive message to respond to regarding shutdown. On the other hand, the top answer to this question quotes no less than Raymond Chen as saying that responding to WM_ENDSESSION is essentially pointless. So this is confusing. Is there some kind of "best practice" principles to apply in deciding which of these messages (if any)