[Lazarus] Lazarus and Windows messages
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Tue Jul 3 01:39:17 CEST 2012
Mattias Gaertner schrieb:
> On Mon, 2 Jul 2012 22:00:05 +0300
> ik <idokan at gmail.com> wrote:
>> I'm trying to capture the windows message WM_QUERYENDSESSION (that exists
>> on JwaWinUser).
>>
>> I did something like this:
>>
>> TForm1 = class(TForm)
>> ...
>> private
>> procedure WMQueryEndSession(var Msg : TLMessage); message
>> WM_QUERYENDSESSION
This message most probably is sent to the application, not to all of its
forms. That's why:
> Why not simply drop a ApplicationProperties onto the form and set the
> OnQueryEndSession event?
Or you add an handler manually to your Application object.
DoDi
More information about the Lazarus
mailing list