windows_programming_notes.nbk: Home | Index | Next Page: WM_MEASUREITEM | Previous Page: WM_MBUTTONUP


 WM_MDISETMENU

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.

To send this message, call the SendMessage function with the following parameters.

    SendMessage( 
      (HWND) hWnd,              // handle to destination window 
      WM_MDISETMENU,            // message to send
      (WPARAM) wParam,          // handle to menu (HMENU)
      (LPARAM) lParam           // handle to window menu (HMENU)
    );

Parameters

Return Values

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

  Windows NT/2000 or later: Requires Windows NT 3.1 or later.
  Windows 95/98/Me: Requires Windows 95 or later.
  Header: Declared in Winuser.h; include Windows.h.

windows_programming_notes.nbk: Home | Index | Next Page: WM_MEASUREITEM | Previous Page: WM_MBUTTONUP


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time