mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +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
3 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,7 @@ typedef struct _DRAW_CONTEXT
|
|||
HWND hWnd;
|
||||
HDC hDC;
|
||||
HTHEME theme;
|
||||
HTHEME hPrevTheme;
|
||||
WINDOWINFO wi;
|
||||
BOOL Active; /* wi.dwWindowStatus isn't correct for mdi child windows */
|
||||
HRGN hRgn;
|
||||
|
|
|
@ -165,6 +165,7 @@ ThemeInitDrawContext(PDRAW_CONTEXT pcontext,
|
|||
GetWindowInfo(hWnd, &pcontext->wi);
|
||||
pcontext->hWnd = hWnd;
|
||||
pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
|
||||
pcontext->hPrevTheme = GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
|
||||
pcontext->theme = OpenThemeData(pcontext->hWnd, L"WINDOW");
|
||||
|
||||
pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
|
||||
|
@ -186,6 +187,8 @@ ThemeCleanupDrawContext(PDRAW_CONTEXT pcontext)
|
|||
|
||||
CloseThemeData (pcontext->theme);
|
||||
|
||||
SetPropW(pcontext->hWnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), pcontext->hPrevTheme);
|
||||
|
||||
if(pcontext->hRgn != NULL)
|
||||
{
|
||||
DeleteObject(pcontext->hRgn);
|
||||
|
|
|
@ -61,7 +61,7 @@ HINSTANCE hDllInst;
|
|||
ATOM atDialogThemeEnabled;
|
||||
|
||||
static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS;
|
||||
static ATOM atWindowTheme;
|
||||
ATOM atWindowTheme;
|
||||
static ATOM atSubAppName;
|
||||
static ATOM atSubIdList;
|
||||
|
||||
|
|
Loading…
Reference in a new issue