Commit 129f48a6 authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32: Don't try to mask out the image for palette-based bitmaps.

parent 447384e7
......@@ -543,8 +543,6 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
SetBkColor (hdcBitmap, bkColor);
BitBlt (hdcMask, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcBitmap, 0, 0, SRCCOPY);
SetBkColor(hdcBitmap, RGB(255,255,255));
/*
* Remove the background from the image
*
......@@ -558,7 +556,11 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
*
* Blt mode 0x220326 is NOTSRCAND
*/
if (bmp.bmBitsPixel > 8) /* NOTSRCAND can't work with palettes */
{
SetBkColor(hdcBitmap, RGB(255,255,255));
BitBlt(hdcBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcMask, 0, 0, 0x220326);
}
DeleteDC(hdcBitmap);
DeleteDC(hdcMask);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment