WM_MDISETMENU

3.0

WM_MDISETMENU
wParam = (WPARAM) (BOOL) fRefresh;             /* refresh flag */
lParam = MAKELPARAM(hmenuFrame, hmenuWindow);  /* new menus    */

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

Parameters

fRefresh

Value of wParam. Specifies whether to refresh the current menus or specify new menus. It is TRUE if the menus should just be refreshed. It is FALSE if, instead, the hmenuFrame and hmenuWindow parameters should be used to specify new menus for the window.

hmenuFrame

Value of the low-order word of lParam. Identifies the new frame-window menu. If this parameter is zero, the frame-window menu is not changed.

hmenuWindow

Value of the high-order word of lParam. Identifies the new Window pop-up menu. If this parameter is zero, the Window pop-up menu is not changed.

Return Value

The return value is the handle of the frame-window menu replaced by this message.

Comments

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

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

If an MDI child window is maximized and this message replaces the MDI frame-window menu, the System menu (sometimes referred to as the Control menu) and restore controls are removed from the previous frame-window menu and added to the new menu.

See Also

DrawMenuBar