From: Zhiyi Zhang <zzhang@codeweavers.com> hdcBmp has hbmTempMask selected after the last SelectObject(), we need to select hbmTempImage into hdcBmp. Otherwise, a mask bitmap is copied into a color bitmap. --- dlls/comctl32/imagelist.c | 1 + dlls/comctl32/tests/imagelist.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 93c502ec0bd..ab65bca7c07 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -721,6 +721,7 @@ ImageList_Copy (HIMAGELIST himlDst, INT iDst, HIMAGELIST himlSrc, hdcBmp, 0, 0, SRCCOPY); /* image */ + SelectObject (hdcBmp, hbmTempImage); BitBlt (himlSrc->hdcImage, ptSrc.x, ptSrc.y, himlSrc->cx, himlSrc->cy, hdcBmp, 0, 0, SRCCOPY); /* delete temporary bitmaps */ diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 4c9084bab85..68ad0ce7a4c 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -2515,7 +2515,6 @@ static void test_copy(void) image_list_get_image_bits_by_bitmap(src, 0, &bits); ok(colour_match(bits, test_bitmaps[1]), "Got unexpected color %08x.\n", bits); image_list_get_image_bits_by_bitmap(src, 1, &bits); - todo_wine ok(colour_match(bits, test_bitmaps[0]), "Got unexpected color %08x.\n", bits); pImageList_Destroy(src); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10037