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

This commit is contained in:
Huw Davies 2015-07-01 21:17:18 +01:00 committed by Alexandre Julliard
parent 8965511957
commit 6c95445559
2 changed files with 4 additions and 2 deletions

View File

@ -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 );

View File

@ -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;
}