As I understand, your "hidden" app never will receive WM_DESTROY:
Code:
1) If user will terminate your app by Ctrl-Alt-Del OR "End-Process" using Task-Manager your app receives nothing. 2) The same if another app uses ExitWindowsEx with EWX_FORCE to log off or reboot (this is abnormal way). 3) If user manually clicks Start - Shut Down - Log Off / Shut Down / Restart OR another app uses ExitWindowsEx with EWX_LOGOFF/EWX_POWEROFF/WX_REBOOT/EWX_SHUTDOWN your app WILL receive %WM_QUERYENDSESSION and you can agree or disagree.
Leave a comment: