WM_MDICREATE

Version 3.0

This message causes a multiple document interface (MDI) client window to create a child window.

Parameter

Description

 

wParam

Not used.

 

lParam

Contains a long pointer to an MDICREATESTRUCT data structure.

 

Return Value

The return value contains the identifier of the new window in the low word and zero in the high word.

Comments

The window is created with the style bits WS_CHILD, WS_CLIPSIBLINGS, WS_CLIPCHILDREN, WS_SYSMENU, WS_CAPTION, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX, plus additional style bits specified in the MDICREATESTRUCT data structure to which lParam points. Windows adds the title of the new child window to the window menu of the frame window. An application should create all child windows of the client window with this message.

If a client window receives any message that changes the activation of child windows and the currently active MDI child window is maximized, Windows restores the currently active child and maximizes the newly activated child.

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.

An application should not send a second WM_MDICREATE message while a WM_MDICREATE message is still being processed. For example, it should not send a WM_MDICREATE message while an MDI child window is processing its WM_CREATE message.