comctl32: CreateToolbarEx should send TB_SETBITMAPSIZE twice.
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index c21cae3..7e44e03 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -693,12 +693,13 @@
SendMessageW (hwndTB, TB_SETBITMAPSIZE, 0,
MAKELPARAM((WORD)dxBitmap, (WORD)dyBitmap));
- if (dxButton <= 0)
- dxButton = 24;
- if (dyButton <= 0)
- dyButton = 22;
- SendMessageW (hwndTB, TB_SETBUTTONSIZE, 0,
- MAKELPARAM((WORD)dxButton, (WORD)dyButton));
+ if (dxButton < 0)
+ dxButton = dxBitmap;
+ if (dyButton < 0)
+ dyButton = dyBitmap;
+ /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
+ if (dxButton != 0 && dyButton != 0)
+ SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
/* add bitmaps */