GetSubMenu function (winuser.h)

Retrieves a handle to the drop-down menu or submenu activated by the specified menu item.

Syntax

HMENU GetSubMenu(
  [in] HMENU hMenu,
  [in] int   nPos
);

Parameters

[in] hMenu

Type: HMENU

A handle to the menu.

[in] nPos

Type: int

The zero-based relative position in the specified menu of an item that activates a drop-down menu or submenu.

Return value

Type: HMENU

If the function succeeds, the return value is a handle to the drop-down menu or submenu activated by the menu item. If the menu item does not activate a drop-down menu or submenu, the return value is NULL.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-menu-l1-1-0 (introduced in Windows 8)

See also

Conceptual

CreatePopupMenu

GetMenu

Menus

Reference