HWND CreateMDIWindow(lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hInstance, lParam) | |||
LPTSTR lpClassName; | |||
LPTSTR lpWindowName; | |||
DWORD dwStyle; | |||
int X; | |||
int Y; | |||
int nWidth; | |||
int nHeight; | |||
HWND hWndParent; | |||
HANDLE hInstance; | |||
LONG lParam; |
The CreateMDIWindow function is similar to the WM_MDICREATE message. The difference is that this function lets you have a multi-threaded MDI application. When you send the WM_MDICREATE message to the MDI client window, the CreateWindow call is made in the context that the MDI client window, and thus all messages for the document window are processed on that thread. With this call you can create the window in a different thread.
lpClassName
Contains a long pointer to the application-defined class of the MDI child window.
lpWindowName
Contains a long pointer to the window title of the MDI child window.
dwStyle
Specifies additional styles for the MDI child window. If the MDI client window was created with the MDIS_ALLCHILDSTYLES window style, the style member may be any combination of the window styles documented with the CreateWindow function. Otherwise, it may be one or more of the following values:
Value | Meaning |
WS_MINIMIZE | MDI child window is created in a minimized state. |
WS_MAXIMIZE | MDI child window is created in a maximized state. |
WS_HSCROLL | MDI child window is created with a horizontal scroll bar. |
WS_VSCROLL | MDI child window is created with a vertical scroll bar. |
X
Specifies the initial position of the left side of the MDI child window. If this member is 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 this member is set to CW_USEDEFAULT, the MDI child window is assigned a default vertical position.
nWidth
Specifies the initial width of the MDI child window. If this member is set to CW_USEDEFAULT, the MDI child window is assigned a default width.
nHeight
Specifies the initial height of the MDI child window. If this member is set to CW_USEDEFAULT, the MDI child window is assigned a default height.
hWndParent
Identifies the window that would have received a WM_MDICREATE message.
hInstance
Identifies the instance handle of the application creating the MDI child window.
lParam
Specifies an application-defined value.
The return value is a handle to the created window.