RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TWinControl.CreateParentedControl Method

Creates and initializes a control as the child of a specified non-VCL window.

Pascal
class function CreateParentedControl(ParentWindow: HWnd): TWinControl;
C++
__fastcall TWinControl * CreateParentedControl(HWnd ParentWindow);

Call CreateParentedControl to embed a new control in a non-VCL parent.  

CreateParentedControl allocates memory for a new instance of the same class as the control (Delphi) or is the class specified by the vmt parameter (C++), sets its ParentWindow property to ParentWindow, and calls the constructor, passing in nil (Delphi) or NULL (C++) for the Owner parameter. CreateParentedControl returns the newly created control. 

CreateParentedControl has the same purpose as CreateParented, but is a simple class function instead of a constructor. Unlike CreateParented, CreateParentedControl can be called from C++ code. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!