uxtheme: Check window handle for GetWindowTheme().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f5e56638a7
commit
16e2a9aecc
|
@ -669,6 +669,13 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
|
|||
HTHEME WINAPI GetWindowTheme(HWND hwnd)
|
||||
{
|
||||
TRACE("(%p)\n", hwnd);
|
||||
|
||||
if (!hwnd)
|
||||
{
|
||||
SetLastError(E_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
|
||||
}
|
||||
|
||||
|
|
|
@ -81,10 +81,7 @@ static void test_GetWindowTheme(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
hTheme = GetWindowTheme(NULL);
|
||||
ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme);
|
||||
todo_wine
|
||||
ok( GetLastError() == E_HANDLE,
|
||||
"Expected E_HANDLE, got 0x%08x\n",
|
||||
GetLastError());
|
||||
ok( GetLastError() == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", GetLastError() );
|
||||
|
||||
/* Only do the bare minimum to get a valid hwnd */
|
||||
hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
|
||||
|
|
Loading…
Reference in New Issue