From b4678a0032944c13bcdc117c744c2946985b2da3 Mon Sep 17 00:00:00 2001 From: Reece Dunn Date: Mon, 27 Oct 2008 09:09:45 +0000 Subject: [PATCH] uxtheme: fixed the todo blocks in the GetWindowTheme tests. --- dlls/uxtheme/system.c | 5 +++++ dlls/uxtheme/tests/system.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 3630a6d..3586221 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -677,6 +677,11 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList) HTHEME WINAPI GetWindowTheme(HWND hwnd) { TRACE("(%p)\n", hwnd); + if (!IsWindow(hwnd)) + { + SetLastError(E_HANDLE); + return NULL; + } return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme)); } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index df20885..3e26547 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -121,10 +121,9 @@ static void test_GetWindowTheme(void) SetLastError(0xdeadbeef); hTheme = pGetWindowTheme(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); -- 1.5.6.3