I made a test on windows about cMaxImage. I think in this case, the initial cMaxImage is set to 1. So I fixed my code. But cMaxImage=2 is procedurally correct. I still have problem about wine test for cMaxImage, I think HIMAGELIST struct is different on windows and wine.Here is the windbg result for test in my attachment. I fixed cGrow=0 to make easier observation. I think the cMaxImage and cCurImage is here. {width=434 height=468} When ImageList_Add was called, it grows as expected. {width=409 height=342} The running result in wine is the same as windows. {width=822 height=600} You can see that HIMAGELIST struct is very different from wine.So I wonder is there any sense to make wine test by using wine structure, which may fail on windows. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10039#note_129134