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

GetMenuItemID function

Retrieves the menu item identifier of a menu item located at the specified position in a menu.

Syntax


UINT WINAPI GetMenuItemID(
  _In_  HMENU hMenu,
  _In_  int nPos
);

Parameters

hMenu [in]

Type: HMENU

A handle to the menu that contains the item whose identifier is to be retrieved.

nPos [in]

Type: int

The zero-based relative position of the menu item whose identifier is to be retrieved.

Return value

Type: UINT

The return value is the identifier of the specified menu item. If the menu item identifier is NULL or if the specified item opens a submenu, the return value is -1.

Examples

For an example, see Example of a Clipboard Viewer.

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
GetMenuItemCount
Conceptual
Menus

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.