Huw Davies : comctl32: Set the default separator width when notifying a -ve cmd id.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 2 07:18:07 CDT 2015


Module: wine
Branch: master
Commit: 6c954455590a93f48a51c497941e547e3ea857c9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6c954455590a93f48a51c497941e547e3ea857c9

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Jul  1 21:17:18 2015 +0100

comctl32: Set the default separator width when notifying a -ve cmd id.

---

 dlls/comctl32/tests/toolbar.c | 3 ++-
 dlls/comctl32/toolbar.c       | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index bb2aed8..96ec3b4 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -195,10 +195,10 @@ static LRESULT parent_wnd_notify(LPARAM lParam)
             }
             else
             {
-                ok( restore->tbButton.iBitmap == -1, "got %08x\n", restore->tbButton.iBitmap );
                 ok( *restore->pCurrent == 0xcafe0000 + restore->iItem, "got %08x\n", *restore->pCurrent );
                 if (restore->iItem < 7 || restore->iItem == 10)
                 {
+                    ok( restore->tbButton.iBitmap == -1, "got %08x\n", restore->tbButton.iBitmap );
                     if (restore->iItem < 7)
                         ok( restore->tbButton.idCommand == restore->iItem * 2 + 1, "%d: got %08x\n", restore->iItem, restore->tbButton.idCommand );
                     else
@@ -208,6 +208,7 @@ static LRESULT parent_wnd_notify(LPARAM lParam)
                 }
                 else
                 {
+                    ok( restore->tbButton.iBitmap == 8, "got %08x\n", restore->tbButton.iBitmap );
                     ok( restore->tbButton.idCommand == 0, "%d: got %08x\n", restore->iItem, restore->tbButton.idCommand );
                     if (restore->iItem == 7)
                         ok( restore->tbButton.fsState == 0, "%d: got %02x\n", restore->iItem, restore->tbButton.fsState );
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index e816d49..11e9678 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -4201,8 +4201,9 @@ TOOLBAR_Restore(TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave)
                 if (*nmtbr.pCurrent & 0x80000000)
                 {
                     /* separator */
+                    nmtbr.tbButton.iBitmap = SEPARATOR_WIDTH;
                     nmtbr.tbButton.idCommand = 0;
-                    nmtbr.tbButton.fsStyle = TBSTYLE_SEP;
+                    nmtbr.tbButton.fsStyle = BTNS_SEP;
                     if (*nmtbr.pCurrent != (DWORD)-1)
                         nmtbr.tbButton.fsState = TBSTATE_HIDDEN;
                 }




More information about the wine-cvs mailing list