Skip to content

Commit 182f353

Browse files
authored
[COMCTL32] ImageList_LoadImageW with CLR_NONE should not use a mask (reactos#7869)
CORE-16146
1 parent ff7bf74 commit 182f353

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dll/win32/comctl32/imagelist.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,7 +2263,20 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow,
22632263
DeleteObject (handle);
22642264
return NULL;
22652265
}
2266+
#ifdef __REACTOS__
2267+
if (clrMask == CLR_NONE)
2268+
nImageCount = ImageList_Add(himl, handle, NULL);
2269+
else
2270+
nImageCount = ImageList_AddMasked(himl, handle, clrMask);
2271+
2272+
if (nImageCount < 0)
2273+
{
2274+
ImageList_Destroy(himl);
2275+
himl = NULL;
2276+
}
2277+
#else
22662278
ImageList_AddMasked (himl, handle, clrMask);
2279+
#endif
22672280
}
22682281
else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) {
22692282
ICONINFO ii;

0 commit comments

Comments
 (0)