Hello, at least the attached patch fixes the problem described in the summary of bug #24 (in the description there are some other problems described too. That's why i CC wine-devel to let one of the bugzilla guru's decide how to proceed with that bug report). ImageList_Remove when called to remove all images on an empty ImageList returns TRUE. Checked with the ControlSpy on Windows 98SE (MSDN wasn't helpfull in this case). Changelog: - Michael Stefaniuc <mstefani@redhat.com> ImageList_Remove returns TRUE when removing all images of an empty ImageList bye michael -- Michael Stefaniuc Tel.: +49-711-96437-199 System Administration Fax.: +49-711-96437-111 Red Hat GmbH Email: mstefani@redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
Index: imagelist.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v retrieving revision 1.53 diff -u -r1.53 imagelist.c --- imagelist.c 31 May 2002 23:25:44 -0000 1.53 +++ imagelist.c 15 Jul 2002 19:36:55 -0000 @@ -2292,6 +2292,8 @@ HDC hdcSrc, hdcDst; INT cxNew, nCount; + TRACE("(himl=%p i=%d)\n", himl, i); + if (himl == NULL) { ERR("Invalid image list handle!\n"); return FALSE; @@ -2302,14 +2304,13 @@ return FALSE; } - if (himl->cCurImage == 0) { - ERR("image list is already empty!\n"); - return FALSE; - } - if (i == -1) { /* remove all */ - TRACE("remove all!\n"); + if (himl->cCurImage == 0) { + /* remove all on empty ImageList is allowed */ + TRACE("remove all on empty ImageList!\n"); + return TRUE; + } himl->cMaxImage = himl->cInitial + himl->cGrow; himl->cCurImage = 0;
Attachment:
pgp00010.pgp
Description: PGP signature