[PATCH] Toolbar : image list can be changed after
TB_SETIMAGELIST;
Gerard Patel
gerard.patel at nerim.net
Sat Jul 14 09:58:00 CDT 2001
The imagelist of a toolbar can be changed by the app after it has set it to
the toolbar (using TB_SETIMAGELIST). In this case the bitmap number can
be wrong, leading to some apps not displaying text correctly (although the
bitmaps were still showing because of Wine code not really testing for
bitmap number in this case). Fix for Winzip 8.0, replaces the preceding
one (same problem)
ChangeLog:
* dlls/comctl32/toolbar.c
Refresh bitmap count to take in account imagelist changes
after TB_SETIMAGELIST
-------------- next part --------------
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.86
diff -u -r1.86 toolbar.c
--- dlls/comctl32/toolbar.c 2001/07/02 17:58:31 1.86
+++ dlls/comctl32/toolbar.c 2001/07/14 12:27:13
@@ -226,9 +226,6 @@
rcText.top += infoPtr->nBitmapHeight;
}
}
- else {
- rcText.top += infoPtr->nBitmapHeight;
- }
if (nState & (TBSTATE_PRESSED | TBSTATE_CHECKED))
OffsetRect (&rcText, 1, 1);
@@ -505,6 +502,10 @@
INT i;
RECT rcTemp;
+ /* if imagelist belongs to the app, it can be changed
+ by the app after setting it */
+ if (infoPtr->himlDef != infoPtr->himlInt)
+ infoPtr->nNumBitmaps = ImageList_GetImageCount(infoPtr->himlDef);
/* redraw necessary buttons */
btnPtr = infoPtr->buttons;
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++)
-------------- next part --------------
More information about the wine-devel
mailing list