GetClassInfo returns class atom on success.

This commit is contained in:
Dmitry Timoshkov 2003-05-19 23:10:54 +00:00 committed by Alexandre Julliard
parent 52b732dd0d
commit 33cf3e0bfd
2 changed files with 16 additions and 5 deletions

View file

@ -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,

View file

@ -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;
}