[UXTHEME] -Fix most new tests for DrawThemeParentBackground. Hackfix CloseThemeData.

svn path=/trunk/; revision=74127
This commit is contained in:
Giannis Adamopoulos 2017-03-08 15:08:56 +00:00
parent 761c932726
commit 5855a53b74
2 changed files with 11 additions and 1 deletions

View file

@ -78,9 +78,17 @@ HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
int hasClip = -1;
TRACE("(%p,%p,%p)\n", hwnd, hdc, prc);
if (!IsWindow(hwnd) || !hdc)
return E_HANDLE;
if (prc && IsBadReadPtr (prc, sizeof(RECT)))
return E_POINTER;
hParent = GetParent(hwnd);
if(!hParent)
hParent = hwnd;
return S_OK;
if(prc) {
rt = *prc;
MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);

View file

@ -897,6 +897,8 @@ HRESULT WINAPI CloseThemeData(HTHEME hTheme)
TRACE("(%p)\n", hTheme);
if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
return E_HANDLE;
if(IsBadReadPtr (hTheme, sizeof(THEME_CLASS))) /* This check is a hack! */
return E_HANDLE;
return MSSTYLES_CloseThemeClass(hTheme);
}