Vcl.Controls.TWinControl.CreateParentedControl
Delphi
class function CreateParentedControl(ParentWindow: HWND): TWinControl;
C++
__classmethod TWinControl* __fastcall CreateParentedControl(HWND ParentWindow);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TWinControl |
Description
Creates and initializes a control as the child of a specified non-VCL window.
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.