GetSubMenu

2.x

  HMENU GetSubMenu(hmenu, nPos)    
  HMENU hmenu; /* handle of menu with pop-up menu */
  int nPos; /* position of pop-up menu */

The GetSubMenu function retrieves the handle of a pop-up menu.

Parameters

hmenu

Identifies the menu with the pop-up menu whose handle is to be retrieved.

nPos

Specifies the position in the given menu of the pop-up menu. Position values start at zero (zero-based) for the first menu item. The pop-up menu's identifier cannot be used in this function.

Return Value

The return value is the handle of the given pop-up menu if the function is successful. Otherwise, it is NULL, indicating that no pop-up menu exists at the given position.

See Also

CreatePopupMenu, GetMenu