[Lazarus] WM_QUERYENDSESSION
Luca Olivetti
luca at wetron.es
Thu Jul 31 10:14:22 CEST 2008
En/na Luca Olivetti ha escrit:
> Hello,
> I see that in win32callback.inc, WM_QUERYENDSESSION filters by LParam=0.
> This allows me to block system shutdown or reboot (by setting
> cancel:=true in an ApplicationProperties OnQueryEndSession event) but
> *not* intercept session closing (since LParam is <>0 in that case, see
> http://msdn.microsoft.com/en-us/library/aa376890.aspx).
> Maybe the lcl should pass on the message even if LParam is <>0 (but it
> should give a wey to differentiate cases).
> BTW, the same happens for WM_ENDSESSION, so the app isn't notified that
> the session is being closed.
As a temporary solution, I just commented out the "and (LParam=0)" in
win32callback.inc, both for WM_QUERYENDSESSION and for WM_ENDSESSION.
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007
More information about the Lazarus
mailing list