Note that there are some explanatory texts on larger screens.

plurals
  1. POWhere should I catch WM_HIBERNATE and WM_CLOSE in Windows Mobile/WinCE?
    text
    copied!<p>I have read about Windows Mobile's <a href="http://blogs.msdn.com/windowsmobile/archive/2006/10/05/The-Emperor-Has-No-Close.aspx" rel="nofollow noreferrer">X button's behaviour</a> and also about WM_HIBERNATE and WM_CLOSE which are sent on <a href="http://blogs.msdn.com/windowsmobile/archive/2006/08/16/702746.aspx" rel="nofollow noreferrer">Low Memory Situation</a> to all <a href="http://blogs.msdn.com/wmshell/archive/2006/05/25/607263.aspx#Valid_Application" rel="nofollow noreferrer">valid</a> applications.</p> <p>MSDN on <a href="http://msdn.microsoft.com/en-us/library/aa925791.aspx" rel="nofollow noreferrer">WM_HIBERNATE</a>:</p> <blockquote> <p>This message is sent to an application when system resources are running low. An application should attempt to release as many resources as possible when sent this message by unloading dialog boxes, destroying windows, or freeing up as much local storage as possible without changing the internal state.</p> </blockquote> <p>MSDN on <a href="http://msdn.microsoft.com/en-us/library/aa921571.aspx" rel="nofollow noreferrer">WM_CLOSE</a>:</p> <blockquote> <p>This message is sent as a signal that a window or an application should terminate.</p> </blockquote> <p><strong>Questions:</strong></p> <ol> <li>Are the messages sent only to the top-level windows or all windows in valid applications?</li> <li>Where should I catch the message? in the main message pump? in every window? or only some windows?</li> <li>If I am using MFC, where should I catch it?</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload