[lazarus] wndproc

Samuel Liddicott sam at campbellsci.co.uk
Fri Oct 22 04:32:56 EDT 1999




> -----Original Message-----
> From: Baeseman, Cliff [mailto:Cliff.Baeseman at greenheck.com]
> Sent: Thursday, October 21, 1999 06:43 PM
> To: 'lazarus at miraclec.com'
> Subject: RE: [lazarus] wndproc
>
> pacalhandler(intEventMessage)
>
>   case intEventMessage of
>
>    WM_CLICK
>         dispatch call
>    WM_DOUBLECLICK
>         dispatch call
>    WM_PAINT
>         dispatch call
>
>
> Is this the type of thing we are shooting for...I tried to stay out of the
> debate before but need to know the direction so that I can change the base
> engine now if necessary.

Nearly.  This handler could dispatch all those messages - but generally
shouldn't.  The ancestor implementation of this function will call
self.Dispatch which then uses the very fast pascal message dispatcher to
call routines declared like:

  Procedure Click(Sender : TObject); message WM_Click;

Of course the handler can be overridden and intercept messages the way you
showed above, equally well new message handler routines could override the
message at the .Dispatch level  [Dispatch is a Delphi method]

Sam






More information about the Lazarus mailing list