[lazarus] Patch: window subclassing, paint messages

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Jul 4 06:52:22 EDT 2003


On Fri, 4 Jul 2003 13:15:15 +0200
"Micha Nelissen" <mdvpost at hotmail.com> wrote:

> Mattias Gaertner wrote:
> > On Fri, 4 Jul 2003 11:36:47 +0200
> > "Micha Nelissen" <mdvpost at hotmail.com> wrote:
> > 
> >> Hi,
> >> 
> >> Attached is a patch to implement proper window subclassing and paint
> >> messages. This will enable _LARGE_ parts of the lcl code with
> >> respect to the interface because we actually get messages like
> >> listbox insertitem etc. Speedbuttons will now also be drawn
> >> correctly, groupboxes are drawn correctly...etc.
> >> 
> >> In wincontrol.inc I have changed the defaulthandler to send a
> >> message. This is still up for debate, and I don't know the effects
> >> on the GTK. Comments are welcome.
> > 
> > I didn't found this behaviour in the VCL. So, I changed them back to
> > calling the DefaultHandler and added a TWinControl.DefaultHandler,
> > that calls the new interface procedure CallDefaultWndHandler. The
> > win32 interface then sends the paint message.
> > Please test it. We can also add an interface method of its own for
> > the paint message, if you like.
> 
> Also:
> 1) make it a function to return a result

The TWinControl.DefaultHandler is a procedure and does not need and does not
expect any result. The interface will better know, what a result means, so
it can handle it.


> 2) more typing on the Message? 'const Message: TLMessage' maybe?

Messages have different size. It must be untyped.


Mattias






More information about the Lazarus mailing list