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

Marc Weustink weus at quicknet.nl
Tue Aug 10 17:36:02 EDT 1999


At 16:44 10-08-99 -0400, "Michael A. Hess" <mhess at miraclec.com> wrote:

[snip]

>OK, now after all of that, here is the only part that you have to get
>cute about. You need to be able to determine WHICH LCL control needs to
>receive the Dispatch. In GTK you are able to pass a pointer to user
>specific data that can be anything you wish. It is in this data, that
>gets passed to the callback, were we placed the pointer to Self. This is
>then how we call the correct Dispatch by doing.
>
>TObject(data).Dispatch(LM_XXX);
>
>were data was the passed value containing "Self".
>
>In Windows it passes back the HWND for the control. That doesn't relate
>to the LCL control at all. You will have to figure out a way to relate
>the HWND value to the control created by the LCL. At this point I'm not
>exactly sure how to do that but it should be possible all the same.
>Either you need to relate HWND or you need to find a way to pass
>additional information, the "Self" value, back to the callback routine.

You can pass extra info to a Windows window. This way you could store the
"self" value when you create it. When you receive a Windows message you can
retrieve the "self" value for this HWND. Look at GetProp, SetProc
(user32.lib, windows.h) etc.

>Now have I made things clearer or have I just muddied the water more?

For me you did

Marc







More information about the Lazarus mailing list