[Lazarus] WM_QUERYENDSESSION
Luca Olivetti
luca at wetron.es
Fri Aug 1 09:40:22 CEST 2008
En/na Luca Olivetti ha escrit:
> 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.
No opinions on this? Should I file a bug or this is the intented
behaviour. If the latter, what about catching session closing?
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