User32EnableMenuItem(SafeHandle, UInt32, Int32) Method
Sets the state of the specified menu item.
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 bool EnableMenuItem(
SafeHandle hMenu,
uint uIDEnableItem,
int uEnable
)
<DllImportAttribute("User32.dll">]
Public Shared Function EnableMenuItem (
hMenu As SafeHandle,
uIDEnableItem As UInteger,
uEnable As Integer
) As Boolean
Dim hMenu As SafeHandle
Dim uIDEnableItem As UInteger
Dim uEnable As Integer
Dim returnValue As Boolean
returnValue = User32.EnableMenuItem(hMenu,
uIDEnableItem, uEnable)
public:
[DllImportAttribute(L"User32.dll")]
static bool EnableMenuItem(
SafeHandle^ hMenu,
unsigned int uIDEnableItem,
int uEnable
)
[<DllImportAttribute("User32.dll")>]
static member EnableMenuItem :
hMenu : SafeHandle *
uIDEnableItem : uint32 *
uEnable : int -> bool
No code example is currently available or this language may not be supported.
- hMenu SafeHandle
-
A handle to the menu.
- uIDEnableItem UInt32
-
The menu item to be enabled, disabled, or grayed, as determined by the uEnable parameter.
This parameter specifies an item in a menu bar, menu, or submenu.
- uEnable Int32
-
Controls the interpretation of the uIDEnableItem parameter and
indicate whether the menu item is enabled, disabled, or grayed.
Boolean
The previous state of the menu item if it exists, or
-1 otherwise.