[lazarus] More Native Win32 stuff (Pascal, can youhelphere?)

Jeff Wormsley daworm at cdc.net
Tue Aug 10 12:23:11 EDT 1999


On 8/10/99, at 11:58 AM, Michael A. Hess wrote: 

>As long as the procedure itself is located in the interfaces or
>win32int.pp (madeup file name) then it is still separating things. We
>would then just have to include the same procedure in the gtkint unit
>but it would just be empty and not do anything.

Thats the whole point, it can't be in the interfaces or win32int.pp file (and that is the name I am using).  The reason being that you must have a unique message handler (WinProc is the usual name) for each windows control.  Delphi does this by making it a method of the TControl object, so that every time you create a new TControl, you automatically have a new message handler that does nothing but handle messages for that control and no other, not even other instances of the same control type.  It is all set up in the Create method, check the source for Controls.Pas in Delphi, look for TControl and TWinControl, check the WindowProc property, and how it is all set up in the Create methods.  

The LCL TControl however, does not define or implement a message handler.  To add one would put Win32 code into the LCL directly.

>I'm quite sure we will find more of the same problems when we try a QT
>version or even a Gnome version for that matter.

This type of thing is why I went ahead and started on Win32 now, before we got way too deep to rethink philosophies.  If this issue came up six months from now, it could be much worse to deal with.

>Did that make any sense???

I understand about the application independence from the toolkit.  

Jeff.







More information about the Lazarus mailing list