From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/tests/misc.c | 65 +++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 29 deletions(-)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index bb3f1993a83..493fdd8ea36 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -385,7 +385,7 @@ static void test_LoadIconWithScaleDown(void) FreeLibrary(hinst); }
-static void check_class( const char *name, int must_exist, UINT style, UINT ignore, BOOL v6 ) +static void check_class( const char *name, int must_exist, UINT style, UINT ignore, BOOL v6, DWORD classnameidx ) { WNDCLASSA wc;
@@ -393,6 +393,7 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno { char buff[64]; HWND hwnd; + DWORD objid;
todo_wine_if(!strcmp(name, "SysLink") && !must_exist && !v6) ok( must_exist, "System class %s should %sexist\n", name, must_exist ? "" : "NOT " ); @@ -410,6 +411,12 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno ok( hwnd != NULL, "Failed to create window for class %s.\n", name ); GetClassNameA(hwnd, buff, ARRAY_SIZE(buff)); ok( !strcmp(name, buff), "Unexpected class name %s, expected %s.\n", buff, name ); + + objid = SendMessageA(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX); + todo_wine_if(classnameidx & 0x80000000) + ok(objid == (classnameidx & 0x7fffffff), "Class %s has nameidx %lx, expected %lx\n", + name, objid, classnameidx & 0x7fffffff); + DestroyWindow(hwnd); } else @@ -420,40 +427,40 @@ static void check_class( const char *name, int must_exist, UINT style, UINT igno static void test_builtin_classes(void) { /* check style bits */ - check_class( "Button", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE ); - check_class( "ComboBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE ); - check_class( "Edit", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE ); - check_class( "ListBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE ); - check_class( "ScrollBar", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE ); - check_class( "Static", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE ); - check_class( "ComboLBox", 1, CS_SAVEBITS | CS_DBLCLKS | CS_DROPSHADOW | CS_GLOBALCLASS, CS_DROPSHADOW, FALSE ); + check_class( "Button", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x10002 ); + check_class( "ComboBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x10005 ); + check_class( "Edit", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x10004 ); + check_class( "ListBox", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x10000 ); + check_class( "ScrollBar", 1, CS_PARENTDC | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x8001000a ); + check_class( "Static", 1, CS_PARENTDC | CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x10003 ); + check_class( "ComboLBox", 1, CS_SAVEBITS | CS_DBLCLKS | CS_DROPSHADOW | CS_GLOBALCLASS, CS_DROPSHADOW, FALSE, 0x10000 ); }
static void test_comctl32_classes(BOOL v6) { - check_class(ANIMATE_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); - check_class(WC_COMBOBOXEXA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(DATETIMEPICK_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(WC_HEADERA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); - check_class(HOTKEY_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(WC_IPADDRESSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE); - check_class(WC_LISTVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); - check_class(MONTHCAL_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(WC_NATIVEFONTCTLA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(WC_PAGESCROLLERA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(PROGRESS_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE); - check_class(REBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); - check_class(STATUSCLASSNAMEA, 1, CS_DBLCLKS | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE); - check_class(WC_TABCONTROLA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE); - check_class(TOOLBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); + check_class(ANIMATE_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x8001000e); + check_class(WC_COMBOBOXEXA, 1, CS_GLOBALCLASS, 0, FALSE, 0); + check_class(DATETIMEPICK_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE, 0); + check_class(WC_HEADERA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, v6 ? 0 : 0x80010011); + check_class(HOTKEY_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE, 0x80010010); + check_class(WC_IPADDRESSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0); + check_class(WC_LISTVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x80010013); + check_class(MONTHCAL_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE, 0); + check_class(WC_NATIVEFONTCTLA, 1, CS_GLOBALCLASS, 0, FALSE, 0); + check_class(WC_PAGESCROLLERA, 1, CS_GLOBALCLASS, 0, FALSE, 0); + check_class(PROGRESS_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x1000d); + check_class(REBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0); + check_class(STATUSCLASSNAMEA, 1, CS_DBLCLKS | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x1000b); + check_class(WC_TABCONTROLA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x1000f); + check_class(TOOLBARCLASSNAMEA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x1000c); if (v6) - check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_DROPSHADOW, CS_SAVEBITS | CS_HREDRAW | CS_VREDRAW /* XP */, TRUE); + check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS | CS_DROPSHADOW, CS_SAVEBITS | CS_HREDRAW | CS_VREDRAW /* XP */, TRUE, 0x80010018); else - check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS | CS_SAVEBITS, CS_HREDRAW | CS_VREDRAW /* XP */, FALSE); - check_class(TRACKBAR_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE); - check_class(WC_TREEVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE); - check_class(UPDOWN_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE); - check_class("SysLink", v6, CS_GLOBALCLASS, 0, FALSE); + check_class(TOOLTIPS_CLASSA, 1, CS_DBLCLKS | CS_GLOBALCLASS | CS_SAVEBITS, CS_HREDRAW | CS_VREDRAW /* XP */, FALSE, 0x80010018); + check_class(TRACKBAR_CLASSA, 1, CS_GLOBALCLASS, 0, FALSE, 0x80010012); + check_class(WC_TREEVIEWA, 1, CS_DBLCLKS | CS_GLOBALCLASS, 0, FALSE, 0x80010019); + check_class(UPDOWN_CLASSA, 1, CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS, 0, FALSE, 0x80010016); + check_class("SysLink", v6, CS_GLOBALCLASS, 0, FALSE, 0); }
struct wm_themechanged_test