Index: dll/win32/user32/windows/cursoricon.c =================================================================== --- dll/win32/user32/windows/cursoricon.c (revision 48785) +++ dll/win32/user32/windows/cursoricon.c (working copy) @@ -481,21 +481,27 @@ StretchDIBits( hdc, 0, height, width, height, 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, color_bits, info, DIB_RGB_COLORS, SRCCOPY ); + + StretchDIBits( hdc, 0, 0, width, height, + 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, + mask_bits, info, DIB_RGB_COLORS, SRCCOPY ); } else { - if (!(*mask = CreateBitmap( width, height, 1, 1, NULL ))) goto done; - if (!(*color = CreateBitmap( width, height, bmi->bmiHeader.biPlanes, - bmi->bmiHeader.biBitCount, NULL ))) - { - DeleteObject( *mask ); - goto done; - } - SelectObject( hdc, *color ); - StretchDIBits( hdc, 0, 0, width, height, - 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, - color_bits, info, DIB_RGB_COLORS, SRCCOPY ); +// if (!(*mask = CreateBitmap( width, height, 1, 1, NULL ))) goto done; +// if (!(*color = CreateBitmap( width, height, bmi->bmiHeader.biPlanes, +// bmi->bmiHeader.biBitCount, NULL ))) +// { +// DeleteObject( *mask ); +// goto done; +// } +// SelectObject( hdc, *color ); +// StretchDIBits( hdc, 0, 0, width, height, +// 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, +// color_bits, info, DIB_RGB_COLORS, SRCCOPY ); + if (!(*color = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT, color_bits, info, DIB_RGB_COLORS ))) goto done; + /* convert info to monochrome to copy the mask */ info->bmiHeader.biBitCount = 1; if (info->bmiHeader.biSize != sizeof(BITMAPCOREHEADER)) @@ -514,12 +520,18 @@ rgb[0].rgbtBlue = rgb[0].rgbtGreen = rgb[0].rgbtRed = 0x00; rgb[1].rgbtBlue = rgb[1].rgbtGreen = rgb[1].rgbtRed = 0xff; } + + if (!(*mask = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT, mask_bits, info, DIB_RGB_COLORS ))) + { + DeleteObject( *color ); + goto done; + } } - SelectObject( hdc, *mask ); - StretchDIBits( hdc, 0, 0, width, height, - 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, - mask_bits, info, DIB_RGB_COLORS, SRCCOPY ); +// SelectObject( hdc, *mask ); +// StretchDIBits( hdc, 0, 0, width, height, +// 0, 0, info->bmiHeader.biWidth, info->bmiHeader.biHeight, +// mask_bits, info, DIB_RGB_COLORS, SRCCOPY ); ret = TRUE; done: