comctl32: toolbar: Fix IDB_STD_VIEW_* icons count (with testcase).
This commit is contained in:
parent
d457b37d82
commit
9e390091db
|
@ -149,6 +149,7 @@ static void test_add_bitmap(void)
|
|||
TBADDBITMAP bmp128;
|
||||
TBADDBITMAP bmp80;
|
||||
TBADDBITMAP stdsmall;
|
||||
TBADDBITMAP addbmp;
|
||||
INT ret;
|
||||
|
||||
/* empty 128x15 bitmap */
|
||||
|
@ -240,6 +241,36 @@ static void test_add_bitmap(void)
|
|||
UpdateWindow(hToolbar);
|
||||
CHECK_IMAGELIST_TODO_COUNT_SIZE(28, 16, 15);
|
||||
|
||||
/* check standard bitmaps */
|
||||
addbmp.hInst = HINST_COMMCTRL;
|
||||
addbmp.nID = IDB_STD_SMALL_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(15, 16, 15);
|
||||
addbmp.nID = IDB_STD_LARGE_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(15, 24, 24);
|
||||
|
||||
addbmp.nID = IDB_VIEW_SMALL_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(12, 16, 15);
|
||||
addbmp.nID = IDB_VIEW_LARGE_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(12, 24, 24);
|
||||
|
||||
addbmp.nID = IDB_HIST_SMALL_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(5, 16, 15);
|
||||
addbmp.nID = IDB_HIST_LARGE_COLOR;
|
||||
rebuild_toolbar(&hToolbar);
|
||||
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
|
||||
CHECK_IMAGELIST(5, 24, 24);
|
||||
|
||||
|
||||
DestroyWindow(hToolbar);
|
||||
}
|
||||
|
||||
|
|
|
@ -2591,7 +2591,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if ((lpAddBmp->nID & ~1) == IDB_STD_SMALL_COLOR)
|
||||
nButtons = 15;
|
||||
else if ((lpAddBmp->nID & ~1) == IDB_VIEW_SMALL_COLOR)
|
||||
nButtons = 13;
|
||||
nButtons = 12;
|
||||
else if ((lpAddBmp->nID & ~1) == IDB_HIST_SMALL_COLOR)
|
||||
nButtons = 5;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue