[lazarus] More Native Win32 stuff(Pascal,canyouhelphere?)
Jeff Wormsley
daworm at cdc.net
Tue Aug 10 17:28:47 EDT 1999
On 8/10/99, at 4:50 PM, Michael A. Hess wrote:
>this is the problem. At present I don't see an easy way to get the value
>Self back to the callback. The other issue is that ALL messages for a
>given window (which in windows means buttons, scrollbars, just about
>everything) goes through only ONE callback for that control. So the
>callback must determine which message it is getting and then tranlate
>the message to an LM_XXX message and call Dispatch. However since Self
>isn't readily available something tricky needs to take place to
>determine which "Self" the passed HWND represents. The only really,
>really nice thing about this is that ALL and I mean ALL of the messages
>from ALL of the controls will go through just ONE callback routine. It
>will make that part of the win32int a whole lot cleaner and smaller than
>the GTK version.
I said I was leaving, but... This answers a WHOLE LOT about what you have been trying to tell me. I saw in the VCL that Delphi implemented a (native) window procedure for each and every component. You are saying to implement one native window procedure for all components, then have that call the LCL window procedure via the callbacks, after figuring out which component it is via the Hwnd variable. Now that I can probably do, if I keep a list of each component I create along with the Self and HWnd, then the dispatch becomes a search and a call. When I get a LM_Destroy I remove the item from the list.
Jeff.
More information about the Lazarus
mailing list