comctl32/tests: Release Imagelist handles when no needed anymore.

This commit is contained in:
Nikolay Sivov 2009-10-24 19:33:36 +04:00 committed by Alexandre Julliard
parent 31ae6a902e
commit eaa939e942
1 changed files with 3 additions and 0 deletions

View File

@ -373,6 +373,8 @@ static void test_add_bitmap(void)
addbmp.hInst = HINST_COMMCTRL;
addbmp.nID = IDB_STD_SMALL_COLOR;
rebuild_toolbar(&hToolbar);
ImageList_Destroy(himl);
ok(SendMessageA(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&addbmp) == 0, "TB_ADDBITMAP - unexpected return\n");
CHECK_IMAGELIST(15, 16, 16);
compare((int)SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0), MAKELONG(23, 22), "%x");
@ -980,6 +982,7 @@ static void test_sizes(void)
rebuild_toolbar(&hToolbar);
ImageList_Destroy(himl);
ImageList_Destroy(himl2);
SendMessageA(hToolbar, TB_ADDBUTTONS, 1, (LPARAM)&buttons3[3]);
ok(SendMessageA(hToolbar, TB_GETBUTTONSIZE, 0, 0) == MAKELONG(27, 39), "Unexpected button size\n");