mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
[UXTHEME] -Fix most new tests for DrawThemeParentBackground. Hackfix CloseThemeData.
svn path=/trunk/; revision=74127
This commit is contained in:
parent
761c932726
commit
5855a53b74
2 changed files with 11 additions and 1 deletions
|
@ -78,9 +78,17 @@ HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
|
||||||
int hasClip = -1;
|
int hasClip = -1;
|
||||||
|
|
||||||
TRACE("(%p,%p,%p)\n", hwnd, hdc, prc);
|
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);
|
hParent = GetParent(hwnd);
|
||||||
if(!hParent)
|
if(!hParent)
|
||||||
hParent = hwnd;
|
return S_OK;
|
||||||
|
|
||||||
if(prc) {
|
if(prc) {
|
||||||
rt = *prc;
|
rt = *prc;
|
||||||
MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
|
MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
|
||||||
|
|
|
@ -897,6 +897,8 @@ HRESULT WINAPI CloseThemeData(HTHEME hTheme)
|
||||||
TRACE("(%p)\n", hTheme);
|
TRACE("(%p)\n", hTheme);
|
||||||
if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
|
if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
|
||||||
return E_HANDLE;
|
return E_HANDLE;
|
||||||
|
if(IsBadReadPtr (hTheme, sizeof(THEME_CLASS))) /* This check is a hack! */
|
||||||
|
return E_HANDLE;
|
||||||
return MSSTYLES_CloseThemeClass(hTheme);
|
return MSSTYLES_CloseThemeClass(hTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue