"Reece Dunn" msclrhd@googlemail.com writes:
@@ -691,11 +691,21 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, HRESULT hr; TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName), debugstr_w(pszSubIdList));
- if(!IsWindow(hwnd))
- {
hr = E_HANDLE;
goto error;
- }
You shouldn't add IsWindow() checks. The error must be detected and handled at the place where the window handle is actually used.