diff --git a/dlls/user/tests/class.c b/dlls/user/tests/class.c index b326cc4e409..6deb3d75fd9 100644 --- a/dlls/user/tests/class.c +++ b/dlls/user/tests/class.c @@ -43,6 +43,7 @@ void ClassTest(HINSTANCE hInstance, BOOL global) WNDCLASSW cls, wc; WCHAR className[] = {'T','e','s','t','C','l','a','s','s',0}; WCHAR winName[] = {'W','i','n','C','l','a','s','s','T','e','s','t',0}; + ATOM test_atom; HWND hTestWnd; DWORD i; WCHAR str[20]; @@ -133,8 +134,10 @@ void ClassTest(HINSTANCE hInstance, BOOL global) "GetClassName returned incorrect name for this window's class"); /* check GetClassInfo with our hInstance */ - if(GetClassInfoW(hInstance, str, &wc)) + if((test_atom = GetClassInfoW(hInstance, str, &wc))) { + ok(test_atom == classatom, + "class atom did not match"); ok(wc.cbClsExtra == cls.cbClsExtra, "cbClsExtra did not match"); ok(wc.cbWndExtra == cls.cbWndExtra, @@ -152,8 +155,10 @@ void ClassTest(HINSTANCE hInstance, BOOL global) /* check GetClassInfo with zero hInstance */ if(global) { - if(GetClassInfoW(0, str, &wc)) + if((test_atom = GetClassInfoW(0, str, &wc))) { + ok(test_atom == classatom, + "class atom did not match %x != %x", test_atom, classatom); ok(wc.cbClsExtra == cls.cbClsExtra, "cbClsExtra did not match %x!=%x",wc.cbClsExtra,cls.cbClsExtra); ok(wc.cbWndExtra == cls.cbWndExtra, diff --git a/windows/class.c b/windows/class.c index 2764027894b..3ae47f4c011 100644 --- a/windows/class.c +++ b/windows/class.c @@ -1127,7 +1127,9 @@ BOOL16 WINAPI GetClassInfo16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASS16 *wc ) wc->hbrBackground = HBRUSH_16(classPtr->hbrBackground); wc->lpszClassName = name; wc->lpszMenuName = CLASS_GetMenuName16( classPtr ); - return TRUE; + + /* We must return the atom of the class here instead of just TRUE. */ + return atom; } @@ -1168,7 +1170,9 @@ BOOL WINAPI GetClassInfoA( HINSTANCE hInstance, LPCSTR name, wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameA( classPtr ); wc->lpszClassName = name; - return TRUE; + + /* We must return the atom of the class here instead of just TRUE. */ + return atom; } @@ -1205,7 +1209,9 @@ BOOL WINAPI GetClassInfoW( HINSTANCE hInstance, LPCWSTR name, wc->hbrBackground = (HBRUSH)classPtr->hbrBackground; wc->lpszMenuName = CLASS_GetMenuNameW( classPtr ); wc->lpszClassName = name; - return TRUE; + + /* We must return the atom of the class here instead of just TRUE. */ + return atom; }