The GetMenu function retrieves the handle to the menu assigned to the given window.
HMENU GetMenu(
HWND hWnd // handle to window
);
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.
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.
Menus Overview, Menu Functions, GetSubMenu, SetMenu