Export (0) Print
Expand All
2 out of 9 rated this helpful - Rate this topic

GetSubMenu function

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

Syntax


HMENU WINAPI GetSubMenu(
  _In_  HMENU hMenu,
  _In_  int nPos
);

Parameters

hMenu [in]

Type: HMENU

A handle to the menu.

nPos [in]

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.

Examples

For an example, see Displaying a Shortcut Menu.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
CreatePopupMenu
GetMenu
Conceptual
Menus

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.