CreateCursor function user32

Win32Result<HCURSOR> CreateCursor(
  1. HINSTANCE? hInst,
  2. int xHotSpot,
  3. int yHotSpot,
  4. int nWidth,
  5. int nHeight,
  6. Pointer<NativeType> pvANDPlane,
  7. Pointer<NativeType> pvXORPlane,
)

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

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-createcursor.

Implementation

Win32Result<HCURSOR> CreateCursor(
  HINSTANCE? hInst,
  int xHotSpot,
  int yHotSpot,
  int nWidth,
  int nHeight,
  Pointer pvANDPlane,
  Pointer pvXORPlane,
) {
  final result_ = CreateCursor_Wrapper(
    hInst ?? nullptr,
    xHotSpot,
    yHotSpot,
    nWidth,
    nHeight,
    pvANDPlane,
    pvXORPlane,
  );
  return Win32Result(value: HCURSOR(result_.value.ptr), error: result_.error);
}