GetMenu

The GetMenu function retrieves the handle to the menu assigned to the given window.

HMENU GetMenu(
  HWND hWnd  // handle to window
);
 

Parameters

hWnd
Handle to the window whose menu handle is retrieved.

Return Values

The return value is the handle to the menu. If the given window has no menu, the return value is NULL. If the window is a child window, the return value is undefined.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.
  Import Library: Use user32.lib.

See Also

Menus Overview, Menu Functions, GetSubMenu, SetMenu