GetClassInfo returns class atom on success.
This commit is contained in:
parent
52b732dd0d
commit
33cf3e0bfd
|
@ -43,6 +43,7 @@ void ClassTest(HINSTANCE hInstance, BOOL global)
|
||||||
WNDCLASSW cls, wc;
|
WNDCLASSW cls, wc;
|
||||||
WCHAR className[] = {'T','e','s','t','C','l','a','s','s',0};
|
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};
|
WCHAR winName[] = {'W','i','n','C','l','a','s','s','T','e','s','t',0};
|
||||||
|
ATOM test_atom;
|
||||||
HWND hTestWnd;
|
HWND hTestWnd;
|
||||||
DWORD i;
|
DWORD i;
|
||||||
WCHAR str[20];
|
WCHAR str[20];
|
||||||
|
@ -133,8 +134,10 @@ void ClassTest(HINSTANCE hInstance, BOOL global)
|
||||||
"GetClassName returned incorrect name for this window's class");
|
"GetClassName returned incorrect name for this window's class");
|
||||||
|
|
||||||
/* check GetClassInfo with our hInstance */
|
/* 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,
|
ok(wc.cbClsExtra == cls.cbClsExtra,
|
||||||
"cbClsExtra did not match");
|
"cbClsExtra did not match");
|
||||||
ok(wc.cbWndExtra == cls.cbWndExtra,
|
ok(wc.cbWndExtra == cls.cbWndExtra,
|
||||||
|
@ -152,8 +155,10 @@ void ClassTest(HINSTANCE hInstance, BOOL global)
|
||||||
/* check GetClassInfo with zero hInstance */
|
/* check GetClassInfo with zero hInstance */
|
||||||
if(global)
|
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,
|
ok(wc.cbClsExtra == cls.cbClsExtra,
|
||||||
"cbClsExtra did not match %x!=%x",wc.cbClsExtra,cls.cbClsExtra);
|
"cbClsExtra did not match %x!=%x",wc.cbClsExtra,cls.cbClsExtra);
|
||||||
ok(wc.cbWndExtra == cls.cbWndExtra,
|
ok(wc.cbWndExtra == cls.cbWndExtra,
|
||||||
|
|
|
@ -1127,7 +1127,9 @@ BOOL16 WINAPI GetClassInfo16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASS16 *wc )
|
||||||
wc->hbrBackground = HBRUSH_16(classPtr->hbrBackground);
|
wc->hbrBackground = HBRUSH_16(classPtr->hbrBackground);
|
||||||
wc->lpszClassName = name;
|
wc->lpszClassName = name;
|
||||||
wc->lpszMenuName = CLASS_GetMenuName16( classPtr );
|
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->hbrBackground = (HBRUSH)classPtr->hbrBackground;
|
||||||
wc->lpszMenuName = CLASS_GetMenuNameA( classPtr );
|
wc->lpszMenuName = CLASS_GetMenuNameA( classPtr );
|
||||||
wc->lpszClassName = name;
|
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->hbrBackground = (HBRUSH)classPtr->hbrBackground;
|
||||||
wc->lpszMenuName = CLASS_GetMenuNameW( classPtr );
|
wc->lpszMenuName = CLASS_GetMenuNameW( classPtr );
|
||||||
wc->lpszClassName = name;
|
wc->lpszClassName = name;
|
||||||
return TRUE;
|
|
||||||
|
/* We must return the atom of the class here instead of just TRUE. */
|
||||||
|
return atom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue