uxtheme: Draw the correct part of the themed parent background to the DC.
This commit is contained in:
parent
1a67f07caa
commit
5bc2785b72
|
@ -100,7 +100,7 @@ HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
|
||||||
hParent = hwnd;
|
hParent = hwnd;
|
||||||
if(prc) {
|
if(prc) {
|
||||||
CopyRect(&rt, prc);
|
CopyRect(&rt, prc);
|
||||||
MapWindowPoints(hwnd, NULL, (LPPOINT)&rt, 2);
|
MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
|
||||||
|
|
||||||
clip = CreateRectRgn(0,0,1,1);
|
clip = CreateRectRgn(0,0,1,1);
|
||||||
hasClip = GetClipRgn(hdc, clip);
|
hasClip = GetClipRgn(hdc, clip);
|
||||||
|
@ -110,8 +110,8 @@ HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
|
||||||
IntersectClipRect(hdc, prc->left, prc->top, prc->right, prc->bottom);
|
IntersectClipRect(hdc, prc->left, prc->top, prc->right, prc->bottom);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GetClientRect(hParent, &rt);
|
GetClientRect(hwnd, &rt);
|
||||||
MapWindowPoints(hParent, NULL, (LPPOINT)&rt, 2);
|
MapWindowPoints(hwnd, hParent, (LPPOINT)&rt, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
OffsetViewportOrgEx(hdc, -rt.left, -rt.top, &org);
|
OffsetViewportOrgEx(hdc, -rt.left, -rt.top, &org);
|
||||||
|
|
Loading…
Reference in New Issue