mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
[uxtheme]
- Fill in WINDOWINFO.cbSize before calling GetWindowInfo - Handle invalid regions passed to WM_NCPAINT - Handle WM_NCUAHDRAWCAPTION and WM_NCUAHDRAWFRAME without doing anything there for now svn path=/branches/GSoC_2011/ThemesSupport/; revision=52542
This commit is contained in:
parent
3e3ba300bd
commit
c49c17744c
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS uxtheme.dll
|
* PROJECT: ReactOS uxtheme.dll
|
||||||
* FILE: dll/win32/uxtheme/themehooks.c
|
* FILE: dll/win32/uxtheme/nonclient.c
|
||||||
* PURPOSE: uxtheme non client area management
|
* PURPOSE: uxtheme non client area management
|
||||||
* PROGRAMMER: Giannis Adamopoulos
|
* PROGRAMMER: Giannis Adamopoulos
|
||||||
*/
|
*/
|
||||||
|
@ -181,6 +181,7 @@ ThemeInitDrawContext(PDRAW_CONTEXT pcontext,
|
||||||
HWND hWnd,
|
HWND hWnd,
|
||||||
HRGN hRgn)
|
HRGN hRgn)
|
||||||
{
|
{
|
||||||
|
pcontext->wi.cbSize = sizeof(pcontext->wi);
|
||||||
GetWindowInfo(hWnd, &pcontext->wi);
|
GetWindowInfo(hWnd, &pcontext->wi);
|
||||||
pcontext->hWnd = hWnd;
|
pcontext->hWnd = hWnd;
|
||||||
pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
|
pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
|
||||||
|
@ -189,15 +190,11 @@ ThemeInitDrawContext(PDRAW_CONTEXT pcontext,
|
||||||
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
|
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
|
||||||
pcontext->CaptionHeight += GetSystemMetrics(pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION );
|
pcontext->CaptionHeight += GetSystemMetrics(pcontext->wi.dwExStyle & WS_EX_TOOLWINDOW ? SM_CYSMCAPTION : SM_CYCAPTION );
|
||||||
|
|
||||||
if(hRgn <= 0)
|
if(hRgn <= (HRGN)1)
|
||||||
{
|
{
|
||||||
hRgn = CreateRectRgnIndirect(&pcontext->wi.rcWindow);
|
hRgn = CreateRectRgnIndirect(&pcontext->wi.rcWindow);
|
||||||
|
}
|
||||||
pcontext->hRgn = hRgn;
|
pcontext->hRgn = hRgn;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pcontext->hRgn = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pcontext->hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN);
|
pcontext->hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN);
|
||||||
}
|
}
|
||||||
|
@ -905,6 +902,10 @@ ThemeWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndPr
|
||||||
Point.y = GET_Y_LPARAM(lParam);
|
Point.y = GET_Y_LPARAM(lParam);
|
||||||
return DefWndNCHitTest(hWnd, Point);
|
return DefWndNCHitTest(hWnd, Point);
|
||||||
}
|
}
|
||||||
|
case WM_NCUAHDRAWCAPTION:
|
||||||
|
case WM_NCUAHDRAWFRAME:
|
||||||
|
/* FIXME: how should these be handled? */
|
||||||
|
return 0;
|
||||||
default:
|
default:
|
||||||
return DefWndProc(hWnd, Msg, wParam, lParam);
|
return DefWndProc(hWnd, Msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue