mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 12:03:29 +00:00
* dont succeed if found Class is local and hInstance is NULL
* set hInstance to input value given when nonzero, zero for global classes and to the actual value of class when its local * reduces the user32_winetest.exe failures by 20 error to 44 svn path=/trunk/; revision=23075
This commit is contained in:
parent
8135ef1f04
commit
a4b70302ef
1 changed files with 16 additions and 3 deletions
|
@ -1772,7 +1772,8 @@ UserSetClassLongPtr(IN PWINDOWCLASS Class,
|
||||||
static BOOL
|
static BOOL
|
||||||
UserGetClassInfo(IN PWINDOWCLASS Class,
|
UserGetClassInfo(IN PWINDOWCLASS Class,
|
||||||
OUT PWNDCLASSEXW lpwcx,
|
OUT PWNDCLASSEXW lpwcx,
|
||||||
IN BOOL Ansi)
|
IN BOOL Ansi,
|
||||||
|
HINSTANCE hInstance)
|
||||||
{
|
{
|
||||||
lpwcx->style = Class->Style;
|
lpwcx->style = Class->Style;
|
||||||
|
|
||||||
|
@ -1783,7 +1784,6 @@ UserGetClassInfo(IN PWINDOWCLASS Class,
|
||||||
|
|
||||||
lpwcx->cbClsExtra = Class->ClsExtra;
|
lpwcx->cbClsExtra = Class->ClsExtra;
|
||||||
lpwcx->cbWndExtra = Class->WndExtra;
|
lpwcx->cbWndExtra = Class->WndExtra;
|
||||||
lpwcx->hInstance = Class->hInstance;
|
|
||||||
lpwcx->hIcon = Class->hIcon; /* FIXME - get handle from pointer */
|
lpwcx->hIcon = Class->hIcon; /* FIXME - get handle from pointer */
|
||||||
lpwcx->hCursor = Class->hCursor; /* FIXME - get handle from pointer */
|
lpwcx->hCursor = Class->hCursor; /* FIXME - get handle from pointer */
|
||||||
lpwcx->hbrBackground = Class->hbrBackground;
|
lpwcx->hbrBackground = Class->hbrBackground;
|
||||||
|
@ -1793,6 +1793,13 @@ UserGetClassInfo(IN PWINDOWCLASS Class,
|
||||||
else
|
else
|
||||||
lpwcx->lpszMenuName = Class->MenuName;
|
lpwcx->lpszMenuName = Class->MenuName;
|
||||||
|
|
||||||
|
if (hInstance)
|
||||||
|
lpwcx->hInstance = hInstance;
|
||||||
|
else if (Class->Global)
|
||||||
|
lpwcx->hInstance = NULL;
|
||||||
|
else
|
||||||
|
lpwcx->hInstance = Class->hInstance;
|
||||||
|
|
||||||
lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->Atom); /* FIXME - return the string? */
|
lpwcx->lpszClassName = (LPCWSTR)((ULONG_PTR)Class->Atom); /* FIXME - return the string? */
|
||||||
|
|
||||||
lpwcx->hIconSm = Class->hIconSm; /* FIXME - get handle from pointer */
|
lpwcx->hIconSm = Class->hIconSm; /* FIXME - get handle from pointer */
|
||||||
|
@ -2154,7 +2161,8 @@ InvalidParameter:
|
||||||
{
|
{
|
||||||
Ret = UserGetClassInfo(Class,
|
Ret = UserGetClassInfo(Class,
|
||||||
lpWndClassEx,
|
lpWndClassEx,
|
||||||
Ansi);
|
Ansi,
|
||||||
|
hInstance);
|
||||||
|
|
||||||
if (Ret)
|
if (Ret)
|
||||||
{
|
{
|
||||||
|
@ -2173,6 +2181,11 @@ InvalidParameter:
|
||||||
|
|
||||||
/* Undocumented behavior! Return the class atom as a BOOL! */
|
/* Undocumented behavior! Return the class atom as a BOOL! */
|
||||||
Ret = (BOOL)ClassAtom;
|
Ret = (BOOL)ClassAtom;
|
||||||
|
|
||||||
|
if (!(Class->Global || Class->System) && hInstance == NULL)
|
||||||
|
{
|
||||||
|
Ret = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue