[lazarus] GetWindowLong

Marc Weustink weus at quicknet.nl
Fri Jan 7 15:30:44 EST 2000


At 12:45 07-01-2000 -0600, you wrote:
>I am working on the function GetWindowLong.  You pass a handle (in gtk's
case it's the pgtkwidget being passed) and a constant that identifies what
element you are looking for.
>
>In this case we are interested in Window Style (GWL_STYLE), handle to the
parent (GWL_HWNDPARENT), the HInstance for the window (GWL_HINSTANCE) , the
address of the wndproc (GWL_WNDPROC) and other things of that nature.
>
>Without the class (the sender) I can't acceess the Parent property, or the
address of the classes wndproc so I was thinking of doing a 
>gtk_object_set_data when the widget is created to store the parent and
itself (the sender property) and then I can get most of that stuff from that.
>
>Anyone have an alternative suggestion???


As the winapi now is implemented it has no knowledge of LCL and I think
that a good thing. 
So (a quick idea) why instead of setting the sender object and the parent
object (?? ifyou have the sender you have the parent ??) just set
GWL_STYLE, GWL_HINSTANCE, GWL_HWNDPARENT, GWL_WNDPROC as data.

Marc







More information about the Lazarus mailing list