The MDICREATESTRUCT data structure contains information about the class, title, owner, location, and size of a multiple document interface (MDI) child window.
typedef struct tagMDICREATESTRUCT
{
LPSTR szClass;
LPSTR szTitle;
HANDLE hOwner;
int x;
int y;
int cx;
int cy;
LONG style;
LONG lParam;
} MDICREATESTRUCT;
The MDICREATESTRUCT structure contains the following fields:
Field | Description | ||
szClass | Contains a long pointer to the application-defined class of the MDI child window. | ||
szTitle | Contains a long pointer to the window title of the MDI child window. | ||
hOwner | Is the instance handle of the application creating the MDI child window. | ||
x | Specifies the initial position of the left side of the MDI child window. If set to CW_USEDEFAULT, the MDI child window is assigned a default horizontal position. | ||
y | Specifies the initial position of the top edge of the MDI child window. If set to CW_USEDEFAULT, the MDI child window is assigned a default vertical position. | ||
cx | Specifies the initial width of the MDI child window. If set to CW_USEDEFAULT, the MDI child window is assigned a default width. | ||
cy | Specifies the initial height of the MDI child window. If set to CW_USEDEFAULT, the MDI child window is assigned a default height. | ||
style | Specifies additional styles for the MDI child window. The style field may be set to one or more of the following values: | ||
Value | Meaning | ||
WS_MINIMIZE | The MDI child window is created in a minimized state. | ||
WS_MAXIMIZE | The MDI child window is created in a maximized state. | ||
WS_HSCROLL | The MDI child window is created with a horizontal scroll bar. | ||
WS_VSCROLL | The MDI child window is created with a vertical scroll bar. | ||
lParam | Is an application-defined 32-bit value. |
When the MDI child window is created, Windows sends the WM_CREATE message to the window. The lParam parameter of the WM_CREATE message contains a pointer to a CREATESTRUCT data structure. The lpCreateParams field of the CREATESTRUCT structure contains a pointer to the MDICREATESTRUCT data structure passed with the WM_MDICREATE message that created the MDI child window.