The system generates a unique handle for each menu. A menu handle is a value of the type HMENU. An application must specify a menu's handle in many of the Windows menu functions. You receive the handle of a menu bar when you create the menu or load a menu resource. (For information about creating menus and loading menus, see Section 0.1.6, “Menu Creation.”)
You can use the GetMenu or GetSubMenu function to retrieve the handle of a menu that has been created or loaded. GetMenu returns the handle of the menu bar assigned to the specified window. GetSubMenu returns the handle of a pop-up menu within the specified menu bar or pop-up menu. You can use the GetSystemMenu function to retrieve the handle of a window's System menu.