WM_QUERYENDSESSION and wxMSW
Volker Bartheld
dr_versaeg at freenet.de
Thu Aug 16 09:28:04 PDT 2007
Hi folks!
I have an ensemble of wxW and non-wxW applications exchanging data via
sockets. An user has reported a problem when shutting down the PC (in fact,
he just pressed the "Soft Off" button) which had the "Ending program please
wait..." popup come up, followed by a Microsoft error reporting sheet.
I don't know how wxW apps are handling WM_QUERYENDSESSION followed by
WM_ENDSESSION (wich WinXP supposedly emits when shutting down) and if it
just results in wxWindow::OnClose() being called on the main window or even
wxWindow::Destroy() being issued on all windows of the app.
Are there any events I should log to get more info?
Findings:
I created a little Win32-native executable, sendmsg, that is capable of
sending all kinds of messages to running applications. In my case, I used
sendmsg -c "Caption of my App" -m WM_QUERYENDSESSION
which made the misbehaving app close without any problems. So I guess the
problem arises when *all* related/communicating applications get the
message at the same moment and shut down more or less synchroneously. Or
probably WinXP does more than just broadcasting WM_QUERYENDSESSION and
WM_ENDSESSION somewhat later.
Any experts out there that could give me a hint?
Thanks in advance!
Volker
--
mailto: V B A R T H E L D at G M X dot D E
More information about the wx-users
mailing list