Skip to content

Latest commit

 

History

History
205 lines (142 loc) · 5.79 KB

nf-winuser-createmdiwindowa.md

File metadata and controls

205 lines (142 loc) · 5.79 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winuser.CreateMDIWindowA
CreateMDIWindowA function (winuser.h)
Creates a multiple-document interface (MDI) child window. (ANSI)
CreateMDIWindowA
WS_HSCROLL
WS_MAXIMIZE
WS_MINIMIZE
WS_VSCROLL
winuser/CreateMDIWindowA
winmsg\createmdiwindow.htm
winmsg
VS|winui|~\winui\windowsuserinterface\windowing\multipledocumentinterface\multipledocumentinterfacereference\multipledocumentinterfacefunctions\createmdiwindow.htm
12/05/2018
CreateMDIWindow, CreateMDIWindow function [Windows and Messages], CreateMDIWindowA, CreateMDIWindowW, WS_HSCROLL, WS_MAXIMIZE, WS_MINIMIZE, WS_VSCROLL, _win32_CreateMDIWindow, _win32_createmdiwindow_cpp, winmsg.createmdiwindow, winui._win32_createmdiwindow, winuser/CreateMDIWindow, winuser/CreateMDIWindowA, winuser/CreateMDIWindowW
winuser.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
CreateMDIWindowW (Unicode) and CreateMDIWindowA (ANSI)
User32.lib
User32.dll
Windows
19H1
CreateMDIWindowA
winuser/CreateMDIWindowA
c++
APIRef
kbSyntax
DllExport
User32.dll
CreateMDIWindow
CreateMDIWindowA
CreateMDIWindowW

CreateMDIWindowA function

-description

Creates a multiple-document interface (MDI) child window.

-parameters

-param lpClassName [in]

Type: LPCTSTR

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

-param lpWindowName [in]

Type: LPCTSTR

The window name. The system displays the name in the title bar of the child window.

-param dwStyle [in]

Type: DWORD

The style of the MDI child window. If the MDI client window is created with the MDIS_ALLCHILDSTYLES window style, this parameter can be any combination of the window styles listed in the Window Styles page. Otherwise, this parameter is limited to 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.

-param X [in]

Type: int

The initial horizontal position, in client coordinates, of the MDI child window. If this parameter is CW_USEDEFAULT ((int)0x80000000), the MDI child window is assigned the default horizontal position.

-param Y [in]

Type: int

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

-param nWidth [in]

Type: int

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

-param nHeight [in]

Type: int

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

-param hWndParent [in, optional]

Type: HWND

A handle to the MDI client window that will be the parent of the new MDI child window.

-param hInstance [in, optional]

Type: HINSTANCE

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

-param lParam [in]

Type: LPARAM

An application-defined value.

-returns

Type: HWND

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.

-see-also

Conceptual

CreateWindow

Multiple Document Interface

Reference

RegisterClassEx

WM_MDICREATE

-remarks

Note

The winuser.h header defines CreateMDIWindow 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.