This topic has not yet been rated - Rate this topic

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.]

Applies to: desktop apps only

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

Syntax

int GetMenuPosFromID(
  __in  HMENU hmenu,
  UINT id
);

Parameters

hmenu [in]

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

Minimum supported server

Windows Server 2003

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.82 or later)

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ