User32GetMenuState(SafeHandle, UInt32, MenuPosition) Method
Note: This API is now obsolete.
Retrieves the menu flags associated with the specified menu item.
If the menu item opens a submenu, this function also returns the number of items in the submenu.
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")]
[ObsoleteAttribute("The GetMenuState function has been superseded by the GetMenuItemInfo. You can still use GetMenuState, however, if you do not need any of the extended features of GetMenuItemInfo.",
false)]
public static uint GetMenuState(
SafeHandle hMenu,
uint uId,
MenuPosition uFlags
)
<DllImportAttribute("User32.dll">]
<ObsoleteAttribute("The GetMenuState function has been superseded by the GetMenuItemInfo. You can still use GetMenuState, however, if you do not need any of the extended features of GetMenuItemInfo.",
false)>
Public Shared Function GetMenuState (
hMenu As SafeHandle,
uId As UInteger,
uFlags As MenuPosition
) As UInteger
Dim hMenu As SafeHandle
Dim uId As UInteger
Dim uFlags As MenuPosition
Dim returnValue As UInteger
returnValue = User32.GetMenuState(hMenu,
uId, uFlags)
public:
[DllImportAttribute(L"User32.dll")]
[ObsoleteAttribute(L"The GetMenuState function has been superseded by the GetMenuItemInfo. You can still use GetMenuState, however, if you do not need any of the extended features of GetMenuItemInfo.",
false)]
static unsigned int GetMenuState(
SafeHandle^ hMenu,
unsigned int uId,
MenuPosition uFlags
)
[<DllImportAttribute("User32.dll")>]
[<ObsoleteAttribute("The GetMenuState function has been superseded by the GetMenuItemInfo. You can still use GetMenuState, however, if you do not need any of the extended features of GetMenuItemInfo.",
false)>]
static member GetMenuState :
hMenu : SafeHandle *
uId : uint32 *
uFlags : MenuPosition -> uint32
No code example is currently available or this language may not be supported.
- hMenu SafeHandle
-
A handle to the menu that contains the menu item whose flags are to be retrieved.
- uId UInt32
-
The menu item for which the menu flags are to be retrieved, as determined by the uFlags parameter.
- uFlags MenuPosition
-
Indicates how the uId parameter is interpreted.
UInt32
If the specified item does not exist, the return value is -1.
If the menu item opens a submenu, the low-order byte of the return value contains the
menu flags associated with the item,
and the high-order byte contains the number of items in the submenu opened by the item.
Otherwise, the return value is a mask (Bitwise
OR) of the menu flags.