UINT GetMenuItemID(hmenu, nPos) | |||||
HMENU hmenu; | /* handle of menu | */ | |||
int nPos; | /* position of menu item | */ |
The GetMenuItemID function retrieves the menu-item identifier of a menu item located at the specified position in the given menu bar or pop-up menu.
hmenu
Identifies the menu bar or pop-up menu that contains the item whose identifier is to be retrieved.
nPos
Specifies the zero-based relative position of the menu item whose identifier is to be retrieved.
The return value specifies the identifier of the given menu item if the function is successful. If the hmenu parameter is NULL or if the specified item invokes a pop-up menu, the return value is -1.
GetMenuItemCount