From 031793e7f9a26e409a511fd5d57581401c03ac4c Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 11 May 2000 21:39:45 +0000 Subject: [PATCH] Remove the background from the new image when it is being replaced with a ReplaceImage. --- dlls/comctl32/imagelist.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 0a923615d5b..2ee0eb4c8be 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2272,6 +2272,16 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage, StretchBlt (hdcImageList, i * himl->cx, 0, himl->cx, himl->cy, hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); + + + /* Remove the background from the image + */ + SelectObject (hdcImageList, himl->hbmImage); + StretchBlt (hdcImageList, + i*himl->cx, 0, himl->cx, himl->cy, + hdcImage, + 0, 0, bmp.bmWidth, bmp.bmHeight, + 0x220326); /* NOTSRCAND */ } DeleteDC (hdcImage);