mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 01:48:11 +00:00
[uxtheme]
- After doing any drawing operation for the non client area, restore the previously opened theme. Fixes GetWindowTheme svn path=/branches/GSoC_2011/ThemesSupport/; revision=52639
This commit is contained in:
parent
832f3db5a1
commit
012c87272c
|
@ -4,6 +4,7 @@ typedef struct _DRAW_CONTEXT
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
HTHEME theme;
|
HTHEME theme;
|
||||||
|
HTHEME hPrevTheme;
|
||||||
WINDOWINFO wi;
|
WINDOWINFO wi;
|
||||||
BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
|
BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
|
||||||
HRGN hRgn;
|
HRGN hRgn;
|
||||||
|
|
|
@ -165,6 +165,7 @@ ThemeInitDrawContext(PDRAW_CONTEXT pcontext,
|
||||||
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);
|
||||||
|
pcontext->hPrevTheme = GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
|
||||||
pcontext->theme = OpenThemeData(pcontext->hWnd, L"WINDOW");
|
pcontext->theme = OpenThemeData(pcontext->hWnd, L"WINDOW");
|
||||||
|
|
||||||
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
|
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
|
||||||
|
@ -186,6 +187,8 @@ ThemeCleanupDrawContext(PDRAW_CONTEXT pcontext)
|
||||||
|
|
||||||
CloseThemeData (pcontext->theme);
|
CloseThemeData (pcontext->theme);
|
||||||
|
|
||||||
|
SetPropW(pcontext->hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), pcontext->hPrevTheme);
|
||||||
|
|
||||||
if(pcontext->hRgn != NULL)
|
if(pcontext->hRgn != NULL)
|
||||||
{
|
{
|
||||||
DeleteObject(pcontext->hRgn);
|
DeleteObject(pcontext->hRgn);
|
||||||
|
|
|
@ -61,7 +61,7 @@ HINSTANCE hDllInst;
|
||||||
ATOM atDialogThemeEnabled;
|
ATOM atDialogThemeEnabled;
|
||||||
|
|
||||||
static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS;
|
static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS;
|
||||||
static ATOM atWindowTheme;
|
ATOM atWindowTheme;
|
||||||
static ATOM atSubAppName;
|
static ATOM atSubAppName;
|
||||||
static ATOM atSubIdList;
|
static ATOM atSubIdList;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue