User32GetMenuItemID(SafeHandle, Int32) Method
Retrieves the menu item identifier of a menu item located at the specified position in a menu.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll")]
public static int GetMenuItemID(
SafeHandle hMenu,
int nPos
)
<DllImportAttribute("User32.dll">]
Public Shared Function GetMenuItemID (
hMenu As SafeHandle,
nPos As Integer
) As Integer
Dim hMenu As SafeHandle
Dim nPos As Integer
Dim returnValue As Integer
returnValue = User32.GetMenuItemID(hMenu,
nPos)
public:
[DllImportAttribute(L"User32.dll")]
static int GetMenuItemID(
SafeHandle^ hMenu,
int nPos
)
[<DllImportAttribute("User32.dll")>]
static member GetMenuItemID :
hMenu : SafeHandle *
nPos : int -> int
No code example is currently available or this language may not be supported.
- hMenu SafeHandle
-
A handle to the menu that contains the item whose identifier is to be retrieved.
- nPos Int32
-
The zero-based relative position of the menu item whose identifier is to be retrieved.
Int32
The return value is the identifier of the specified menu item.
If the menu item identifier is
Zero or if the specified item opens a submenu,
the return value is
-1.