user32: Use CreateIconIndirect to implement CreateCursor.
This commit is contained in:
parent
217828978f
commit
001abc3c62
|
@ -1431,20 +1431,21 @@ HCURSOR WINAPI CreateCursor( HINSTANCE hInstance,
|
||||||
INT nWidth, INT nHeight,
|
INT nWidth, INT nHeight,
|
||||||
LPCVOID lpANDbits, LPCVOID lpXORbits )
|
LPCVOID lpANDbits, LPCVOID lpXORbits )
|
||||||
{
|
{
|
||||||
CURSORICONINFO info;
|
ICONINFO info;
|
||||||
|
HCURSOR hCursor;
|
||||||
|
|
||||||
TRACE_(cursor)("%dx%d spot=%d,%d xor=%p and=%p\n",
|
TRACE_(cursor)("%dx%d spot=%d,%d xor=%p and=%p\n",
|
||||||
nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits);
|
nWidth, nHeight, xHotSpot, yHotSpot, lpXORbits, lpANDbits);
|
||||||
|
|
||||||
info.ptHotSpot.x = xHotSpot;
|
info.fIcon = FALSE;
|
||||||
info.ptHotSpot.y = yHotSpot;
|
info.xHotspot = xHotSpot;
|
||||||
info.nWidth = nWidth;
|
info.yHotspot = yHotSpot;
|
||||||
info.nHeight = nHeight;
|
info.hbmMask = CreateBitmap( nWidth, nHeight, 1, 1, lpANDbits );
|
||||||
info.nWidthBytes = 0;
|
info.hbmColor = CreateBitmap( nWidth, nHeight, 1, 1, lpXORbits );
|
||||||
info.bPlanes = 1;
|
hCursor = CreateIconIndirect( &info );
|
||||||
info.bBitsPerPixel = 1;
|
DeleteObject( info.hbmMask );
|
||||||
|
DeleteObject( info.hbmColor );
|
||||||
return HICON_32(CreateCursorIconIndirect16(0, &info, lpANDbits, lpXORbits));
|
return hCursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue