First, I realized that once you stored the sender, you didn't need to store the parent but I didn't want to send out an email just for the purposes of stating my realization.
Second, just setting those specific items as data won't work because there are more than just those. I just gave those as an example. there are a few more I would use so I was thinking of storing the class which would encompass everything.
Shane
>> 01/07/00 02:30PM >>>
you wroteI 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
_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus
