TOOLBAR_SetButtonSize bug

François Gouget fgouget at codeweavers.com
Fri Feb 16 01:11:23 CST 2001



   The comment in the code says it all:

    /* The documentation claims you can only change the button size
before
     * any button has been added. But this is wrong. 
     * WINZIP32.EXE (ver 8) calls this on one of its buttons after
adding 
     * it to the toolbar, and it checks that the return value is nonzero
- mjm
     * Further testing shows that we must actually perform the change
too.
     */


Changelog:

   François Gouget <fgouget at codeweavers.com>

 * dlls/comctl32/toolbar.c

   TB_SETBUTTONSIZE messages must be taken into account even after
buttons have been added


-- 
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/cvs/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.78
diff -u -r1.78 toolbar.c
--- dlls/comctl32/toolbar.c	2001/02/14 21:42:10	1.78
+++ dlls/comctl32/toolbar.c	2001/02/15 06:44:30
@@ -3248,17 +3248,12 @@
 	return FALSE;
     }
 
-    /* Button size can only be set before adding any button to the toolbar
-       according to the documentation.  */
-    /* this appears to be wrong. WINZIP32.EXE (ver 8) calls this on
-       one of its buttons after adding it to the toolbar, and it
-       checks that the return value is nonzero - mjm */
-    if( infoPtr->nNumButtons != 0 )
-    {
-        WARN("Button size set after button in toolbar\n");
-        return TRUE;
-    }
-
+    /* The documentation claims you can only change the button size before
+     * any button has been added. But this is wrong. 
+     * WINZIP32.EXE (ver 8) calls this on one of its buttons after adding 
+     * it to the toolbar, and it checks that the return value is nonzero - mjm
+     * Further testing shows that we must actually perform the change too.
+     */
     infoPtr->nButtonWidth = (INT)LOWORD(lParam);
     infoPtr->nButtonHeight = (INT)HIWORD(lParam);
     return TRUE;


More information about the wine-patches mailing list