WM_MDISETMENU message

An application sends the WM_MDISETMENU message to a multiple-document interface (MDI) client window to replace the entire menu of an MDI frame window, to replace the window menu of the frame window, or both.


#define WM_MDISETMENU                   0x0230

Parameters

wParam

A handle to the new frame window menu. If this parameter is NULL, the frame window menu is not changed.

lParam

A handle to the new window menu. If this parameter is NULL, the window menu is not changed.

Return value

Type: HMENU

If the message succeeds, the return value is the handle to the old frame window menu.

If the message fails, the return value is zero.

Remarks

After sending this message, an application must call the DrawMenuBar function to update the menu bar.

If this message replaces the window menu, the MDI child window menu items are removed from the previous window menu and added to the new window menu.

If an MDI child window is maximized and this message replaces the MDI frame window menu, the window menu icon and restore icon are removed from the previous frame window menu and added to the new frame window menu.

Requirements

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

Reference
DrawMenuBar
WM_MDIREFRESHMENU
Conceptual
Multiple Document Interface

 

 

Community Additions

ADD
Show:
© 2014 Microsoft