MDICREATESTRUCTA structure (winuser.h)

Contains information about the class, title, owner, location, and size of a multiple-document interface (MDI) child window.

Syntax

typedef struct tagMDICREATESTRUCTA {
  LPCSTR szClass;
  LPCSTR szTitle;
  HANDLE hOwner;
  int    x;
  int    y;
  int    cx;
  int    cy;
  DWORD  style;
  LPARAM lParam;
} MDICREATESTRUCTA, *LPMDICREATESTRUCTA;

Members

szClass

Type: LPCTSTR

The name of the window class of the MDI child window. The class name must have been registered by a previous call to the RegisterClass function.

szTitle

Type: LPCTSTR

The title of the MDI child window. The system displays the title in the child window's title bar.

hOwner

Type: HANDLE

A handle to the instance of the application creating the MDI client window.

x

Type: int

The initial horizontal position, in client coordinates, of the MDI child window. If this member is CW_USEDEFAULT, the MDI child window is assigned the default horizontal position.

y

Type: int

The initial vertical position, in client coordinates, of the MDI child window. If this member is CW_USEDEFAULT, the MDI child window is assigned the default vertical position.

cx

Type: int

The initial width, in device units, of the MDI child window. If this member is CW_USEDEFAULT, the MDI child window is assigned the default width.

cy

Type: int

The initial height, in device units, of the MDI child window. If this member is set to CW_USEDEFAULT, the MDI child window is assigned the default height.

style

Type: DWORD

The style of the MDI child window. If the MDI client window was created with the MDIS_ALLCHILDSTYLES window style, this member can be any combination of the window styles listed in the Window Styles page. Otherwise, this member can be one or more of the following values.

Value Meaning
WS_MINIMIZE
0x20000000L
Creates an MDI child window that is initially minimized.
WS_MAXIMIZE
0x01000000L
Creates an MDI child window that is initially maximized.
WS_HSCROLL
0x00100000L
Creates an MDI child window that has a horizontal scroll bar.
WS_VSCROLL
0x00200000L
Creates an MDI child window that has a vertical scroll bar.

lParam

Type: LPARAM

An application-defined value.

Remarks

When the MDI client window creates an MDI child window by calling CreateWindow, the system sends a WM_CREATE message to the created window. The lParam member of the WM_CREATE message contains a pointer to a CREATESTRUCT structure. The lpCreateParams member of this structure contains a pointer to the MDICREATESTRUCT structure passed with the WM_MDICREATE message that created the MDI child window.

Note

The winuser.h header defines MDICREATESTRUCT as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header winuser.h (include Windows.h)

See also

CLIENTCREATESTRUCT

CREATESTRUCT

Conceptual

Multiple Document Interface

Reference

WM_CREATE