Paul Ishenin schrieb:
21.10.2011 5:39, Hans-Peter Diettrich wrote:
What's the purpose and action of TWinControl.AddControl?
The source code comment suggests
Add Handle object to *parents* Handle object.
but the code invokes
TWSControlClass(WidgetSetClass).AddControl(Self);
with no Parent involved!
Can somebody explain that?
Well, Parent and Parent Handle are different. Parent is about LCL/VCL
TControl property and Parent Handle is about widgetset window object
like a call to SetParent(hWndChild, hWndParent: HWND): HWND.
Right, but what's the purpose of AddControl, then?
Does it tell the widget to associate itself with the given control?
Or does the widgetset obtain the associated widget from the LCL
control.Handle, and then does what?
We also can postpone this question, until the widgetset interface is
documented. For now it may be sufficient to document AddControl as
"Call this method when <what reason or purpose?>".
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus