[lazarus] DefaultHandler
Micha Nelissen
mdvpost at hotmail.com
Fri Jul 4 01:30:24 EDT 2003
Mattias Gaertner wrote:
> On Thu, 3 Jul 2003 23:03:24 +0200
> "Micha Nelissen" <mdvpost at hotmail.com> wrote:
>
>> Hi,
>>
>> There are several calls to DefaultHandler in the LCL. Notably,
>> TWinControl.PaintWindow, but there are more. Currently these do
>> nothing. Shouldn't they be replaced with IntSendMessage or something
>> alike? Or implement the DefaultHandler function? I guess that would
>> call IntSendMessage after all, so we don't need the extra step.
>
> Hmm.
> The messages are a problem. They make it harder to create new
> interfaces, they are hardly extendable, they are not smart linkable
> and last but not least they make debugging more difficult. There are
> already far too many of them. I think, we should try to keep only the
> most common needed for delphi compatibility and replace the rest with
> methods.
Could you take (or have you taken) a look at TWinControl.PaintWindow? The
code suggests that it's on it's 'way' to go send a message. It prepares
message with type, wparam, lparam, etc. so that's why I suggested it.
If these messages are annoying way of programming, which I think too, (large
cases and such), why not remove them completely and replace with virtual
functions all together? It'll make it a lot clearer and extendable, as you
said.
Regards,
Micha.
More information about the Lazarus
mailing list