From df0d77b007a8187fb344ae3201a0d93697501421 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 17 May 2007 10:56:39 -0500 Subject: [PATCH] comctl32: Trying to blend an image without a mask causes problem, especially if the background is white. --- dlls/comctl32/imagelist.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 0c23d19d0a7..3c9e89b2994 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1192,8 +1192,13 @@ ImageList_DrawIndirect (IMAGELISTDRAWPARAMS *pimldp) hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour)); PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY ); - BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND ); - BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT ); + if (himl->hbmMask) + { + BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND ); + BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT ); + } + else + BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCCOPY); DeleteObject (SelectObject (hImageDC, hOldBrush)); } -- 2.11.4.GIT