From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/tests/misc.c | 6 ------ dlls/comctl32/tests/toolbar.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index 4e33a4cc8dd..29ba90cffb2 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -1402,12 +1402,6 @@ static void test_CCM_SETVERSION(BOOL v6) ok(lr == (j == 0 ? 0 : (j - 1)), "Got unexpected %Id.\n", lr); }
- if (!strcmp(class_names[i], TOOLBARCLASSNAMEA)) - { - lr = SendMessageA(hwnd, TB_GETUNICODEFORMAT, 0, 0); - ok(lr == 0, "Got unexpected %Id.\n", lr); - } - winetest_pop_context(); }
diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index ba2720ac0b4..81f54d7b633 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -2940,6 +2940,25 @@ static void test_WM_NOTIFY(void) DestroyWindow(toolbar); }
+static void test_unicode_format(void) +{ + HWND hwnd = NULL; + LRESULT lr; + + rebuild_toolbar(&hwnd); + + /* Test that CCM_SETVERSION shouldn't change the Unicode character format flag for the control */ + SendMessageA(hwnd, CCM_SETVERSION, 5, 0); + lr = SendMessageA(hwnd, TB_GETUNICODEFORMAT, 0, 0); + ok(lr == 0, "Got unexpected %Id.\n", lr); + + SendMessageA(hwnd, CCM_SETVERSION, 6, 0); + lr = SendMessageA(hwnd, TB_GETUNICODEFORMAT, 0, 0); + ok(lr == 0, "Got unexpected %Id.\n", lr); + + DestroyWindow(hwnd); +} + START_TEST(toolbar) { ULONG_PTR ctx_cookie; @@ -2992,6 +3011,7 @@ START_TEST(toolbar) test_imagelist(); test_BTNS_SEP(); test_WM_NOTIFY(); + test_unicode_format();
if (!load_v6_module(&ctx_cookie, &ctx)) return; @@ -2999,6 +3019,7 @@ START_TEST(toolbar) test_create(TRUE); test_visual(); test_BTNS_SEP(); + test_unicode_format();
PostQuitMessage(0); while(GetMessageA(&msg,0,0,0)) {