[lazarus] More Native Win32 stuff (Pascal, canyouhelphere?)
Jeff Wormsley
daworm at cdc.net
Tue Aug 10 13:47:12 EDT 1999
>Yes it does. The message handling that is being currently done is on a
>control by control bases. Every TControl object has it's OWN message
>handling. You don't find this code in the LCL because it is handled by
>the RTL. That is where the base TObject is defined. Every TObject has
>it's own message handler. That is what Dispatch is doing. When you call
>Dispatch you are calling Dispatch for that object and it goes through
>it's table of messages to determine which one it needs to deal with.
I will have to look into the RTL TObject declaration. It was my understanding that this had nothing to do with native Windows messages, hence the definition for a WindowProc _variable_ in TControl, but no implementation for it. But, if I have to go all the way to the RTL to catch messages and translate them to Windows, where do I put this code? Does that mean I need to modify TObject?
>I guess this is why I am confused by your problem. There shouldn't be
>any problem having Windows call the same messaging handling that we are
>using for GTK. It is basically setup the same way that the Delphi
>messages are.
>
>What am I missing???
Like I said earlier, it may be me that is missing something. All I know is that I could find no property of a TControl that I could translate a message such as LM_Create to and cause an instance of TForm to define a window handler for. I didn't see this when I looked at TControl, and only glanced down the tree at TObject (since Delphi did it at TControl/TWinControl, I didn't go much deeper in LCL). So, if this is in the TObject, then I should be able to catch a LM_xxx message in Interfaces, translate it to a windows message, and then call TObject(Sender).Dispatch(Win32Message) ??? Is this what I missed?
Jeff.
More information about the Lazarus
mailing list