Where should I catch WM_HIBERNATE and WM_CLOSE in Windows Mobile/WinCE?
- by afriza
I have read about Windows Mobile's X button's behaviour, WM_HIBERNATE, and WM_CLOSE on Low Memory Situation.
MSDN on WM_HIBERNATE:
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.
MSDN on WM_CLOSE:
This message is sent as a signal that a window or an application should terminate.
Where should I catch the message? in the main message pump? in every window? or only some windows?
If I am using MFC, where should I catch it?