The GetSubMenu function retrieves the handle to the drop-down menu or submenu activated by the specified menu item.
HMENU GetSubMenu(
HMENU hMenu, // handle to menu
int nPos // menu item position
);
If the function succeeds, the return value is the 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.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Menus Overview, Menu Functions, CreatePopupMenu, GetMenu