User32SetMenuItemBitmaps(SafeHandle, UInt32, MenuPosition, IntPtr, IntPtr) Method
Associates the specified bitmap with a menu item.
Whether the menu item is selected or clear,
the system displays the appropriate bitmap next to the 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 SetMenuItemBitmaps(
SafeHandle hMenu,
uint uPosition,
MenuPosition uFlags,
IntPtr hBitmapUnchecked,
IntPtr hBitmapChecked
)
<DllImportAttribute("User32.dll">]
Public Shared Function SetMenuItemBitmaps (
hMenu As SafeHandle,
uPosition As UInteger,
uFlags As MenuPosition,
hBitmapUnchecked As IntPtr,
hBitmapChecked As IntPtr
) As Boolean
Dim hMenu As SafeHandle
Dim uPosition As UInteger
Dim uFlags As MenuPosition
Dim hBitmapUnchecked As IntPtr
Dim hBitmapChecked As IntPtr
Dim returnValue As Boolean
returnValue = User32.SetMenuItemBitmaps(hMenu,
uPosition, uFlags, hBitmapUnchecked,
hBitmapChecked)
public:
[DllImportAttribute(L"User32.dll")]
static bool SetMenuItemBitmaps(
SafeHandle^ hMenu,
unsigned int uPosition,
MenuPosition uFlags,
IntPtr hBitmapUnchecked,
IntPtr hBitmapChecked
)
[<DllImportAttribute("User32.dll")>]
static member SetMenuItemBitmaps :
hMenu : SafeHandle *
uPosition : uint32 *
uFlags : MenuPosition *
hBitmapUnchecked : IntPtr *
hBitmapChecked : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hMenu SafeHandle
-
A handle to the menu containing the item to receive new check-mark bitmaps.
- uPosition UInt32
-
The menu item to be changed, as determined by the uFlags parameter.
- uFlags MenuPosition
-
Specifies how the uPosition parameter is to be interpreted.
- hBitmapUnchecked IntPtr
-
A handle to the bitmap displayed when the menu item is not selected.
- hBitmapChecked IntPtr
-
A handle to the bitmap displayed when the menu item is selected.
Boolean
If the function succeeds, the return is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.