RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Controls.TCreateParams Record

TCreateParams is the window-creation parameter record used to specify the type of window to create for a windowed control.

Pascal
TCreateParams = record
  Caption: PChar;
  Style: DWORD;
  ExStyle: DWORD;
  X: Integer;
  Y: Integer;
  Height: Integer;
  Width: Integer;
  WndParent: HWnd;
  Param: Pointer;
  WindowClass: TWndClass;
  WinClassName: array[0..63] of Char;
end;
C++
struct TCreateParams {
  const char * Caption;
  DWORD Style;
  DWORD ExStyle;
  int X;
  int Y;
  int Height;
  int Width;
  HWnd WndParent;
  void * Param;
  TWndClass WindowClass;
  array[0..63] of Char WinClassName;
};

Controls

TCreateParams is a data structure for holding information needed when telling Windows to create a window. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function. TCreateParams contains the following fields:

Field 
Meaning 
Caption  
The window caption. This is usually the value of the Caption or Text property of the control.  
Style  
The Windows style for the window. This is a bit array of flags such as WS_CHILD or WS_DISABLED. See the Microsoft Windows documentation for possible flags.  
ExStyle  
The extended Windows style for the window. This is one of the Windows predefined extended style constants such as WS_EX_TOOLWINDOW or WS_EX_CONTROLPARENT. See the Microsoft Windows documentation for possible values.  
X  
The x coordinate of the left side of the window. This is usually the same as the Left property.  
Y  
The y coordinate of the top of the window. This is usually the same as the Top property.  
Width  
The width, in pixels, of the window. This is usually the same as the Width property.  
Height  
The height, in pixels, of the window. This is usually the same as the Height property.  
WndParent  
The window handle of the parent window. This is the same as the Handle property of the parent control.  
Param  
A pointer to the windows creation parameter that is passed as the LParam of the WM_CREATE message.  
WindowClass  
The WindowClass record that describes the class of window being created. The WindowClass record includes information about the window procedure, style, default cursor, background brush, associated menus, and so on.  
WinClassName  
The window class name. This must be the name of a window class that has already been registered. Windows provides several built-in window classes with predefined names. Applications may also register their own custom window classes.  

 

TWinControl

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