Sign in Join
FPDoc Onlineexperiment

TWinControl.CreateWnd procedure

Member of TWinControlprotectedIn unit Controls

Creates the interface object (widget) and assigns the value in Handle.

Declaration

pascal
procedure CreateWnd; virtual

Description

Raises a catchable debugger exception for various conditions, including:

  • The control, or its Parent, has the value csDestroying in the ComponentState property.
  • The method has been called recursively, as indicated by values in the window control flags.
  • The method has been called at run-time before LCL component streaming has been completed.
  • The Handle was not successfully created in the widgetset class.

Ensures that the realized bounds for the control is reset prior to creating the Handle for the control and any child Controls. An EInvalidOperation exception is raised if the handle for the Parent control is not valid when the method is called.

Calls the InvalidatePreferredSize method for the control, and any child controls, and calls AdjustSize. If an error occurred while creating the Handle, auto-sizing is not enabled for the control.

CreateWnd is called from the CreateHandle method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.