GetMenuPosFromID function

[GetMenuPosFromID is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Determines the position of an item in a menu. Used in the case where the item's ID is known.

Syntax

int GetMenuPosFromID(
  HMENU hmenu,
  UINT  id
);

Parameters

hmenu

Type: HMENU

The handle of the menu.

id

Type: UINT

An application-defined 16-bit value that identifies the menu item.

Return Value

Type: int

The item's zero-based position in the menu.

Remarks

Beginning with Windows Vista, this function is declared in Shlwapi.h.

Windows XP:  This function is declared in Shlwapi.dll.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlwapi.h
Library Shlwapi.lib
DLL Shlwapi.dll (version 5.82 or later)