User32CreateCursor Method

Creates a cursor having the specified size, bit patterns, and hot spot.

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", ExactSpelling = true, SetLastError = true)]
public static IntPtr CreateCursor(
	IntPtr hInst,
	int xHotSpot,
	int yHotSpot,
	int width,
	int height,
	IntPtr planeAND,
	IntPtr planeXOR
)

Parameters

hInst  IntPtr
A handle to the current instance of the application creating the cursor.
xHotSpot  Int32
The horizontal position of the cursor's hot spot.
yHotSpot  Int32
The vertical position of the cursor's hot spot.
width  Int32
The width of the cursor, in pixels.
height  Int32
The height of the cursor, in pixels.
planeAND  IntPtr
An array of bytes that contains the bit values for the AND mask of the cursor, as in a device-dependent monochrome bitmap.
planeXOR  IntPtr
An array of bytes that contains the bit values for the XOR mask of the cursor, as in a device-dependent monochrome bitmap.

Return Value

IntPtr
If the function succeeds, the return value is a handle to the cursor.

If the function fails, the return value is Zero.

Remarks

See Also