The CreateMDIWindow function creates a multiple document interface (MDI) child window.
HWND CreateMDIWindow(
LPTSTR lpClassName, // pointer to registered child class name
LPTSTR lpWindowName, // pointer to window name
DWORD dwStyle, // window style
int X, // horizontal position of window
int Y, // vertical position of window
int nWidth, // width of window
int nHeight, // height of window
HWND hWndParent, // handle to parent window (MDI client)
HINSTANCE hInstance, // handle to application instance
LPARAM lParam // application-defined value
);
Value | Meaning |
---|---|
WS_MINIMIZE | Creates an MDI child window that is initially minimized. |
WS_MAXIMIZE | Creates an MDI child window that is initially maximized. |
WS_HSCROLL | Creates an MDI child window that has a horizontal scroll bar. |
WS_VSCROLL | Creates an MDI child window that has a vertical scroll bar. |
If the function succeeds, the return value is the handle to the created window.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Using the CreateMDIWindow function is similar to sending the WM_MDICREATE message to an MDI client window, except that the function can create an MDI child window in a different thread, while the message cannot.
Windows 95: The system can support a maximum of 16,364 window handles.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Multiple Document Interface Overview, Multiple Document Interface Functions, CreateWindow, RegisterClassEx, WM_MDICREATE