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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

Boolean
If the function succeeds, the return is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also