From: Kun Yang <yangkun@uniontech.com> Logs: When CreateDIBSection does not return a valid hbitmap, the source image is lost that only masked icon is shown in imagelist. Signed-off-by: Kun Yang <yangkun@uniontech.com> --- dlls/comctl32/imagelist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 443078600e4..978aeaa7755 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -3091,10 +3091,10 @@ static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count) if(!hbmNewBitmap) { UINT newImageCount = 1; - //if CreateDIBSection failed, allocate for 1 image only. + /*if CreateDIBSection failed, allocate for 1 image only.*/ bmi->bmiHeader.biHeight = newImageCount * himl->cy; hbmNewBitmap = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, 0, 0); - //the max image count is set to 2, expand when exceeded. + /*the max image count is set to 2, expand when exceeded.*/ himl->cMaxImage = newImageCount + 1; } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10039