The system generates a unique handle for each menu. A menu handle is a value of the HMENU type. An application must specify a menu handle in many of the Win32 menu functions. You receive the handle to a menu bar when you create the menu or load a menu resource. For more information, see Menu Creation.
To retrieve the handle to the menu bar for a menu that has been created or loaded, use the GetMenu function. To retrieve the handle to the submenu associated with a menu item, use the GetSubMenu or GetMenuItemInfo function. To retrieve the handle to a window menu, use the GetSystemMenu function.