by setting fancy theme thingy just once the problems go away

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1580 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2011-01-05 21:30:35 +00:00
parent f4afb5676f
commit bcaef7eb30
3 changed files with 25 additions and 5 deletions
+9 -2
View File
@@ -357,8 +357,8 @@ void draw_selection_rectangle(Window* win, DC& dc, const wxRect& rect, bool sele
r.right = rect.x + rect.width;
r.bottom = rect.y + rect.height;
if (hTheme) {
//wxUxThemeEngine::Get()->SetWindowTheme((HWND)win->GetHWND(), L"Explorer", NULL);
wxUxThemeEngine::Get()->DrawThemeBackground(
//themeEngine->SetWindowTheme((HWND)win->GetHWND(), L"Explorer", NULL);
themeEngine->DrawThemeBackground(
(HTHEME)hTheme,
(HDC)dc.GetHDC(),
LVP_LISTITEM,
@@ -371,3 +371,10 @@ void draw_selection_rectangle(Window* win, DC& dc, const wxRect& rect, bool sele
}
#endif
}
void enable_themed_selection_rectangle(Window* win) {
wxUxThemeEngine *themeEngine = wxUxThemeEngine::Get();
if (themeEngine && themeEngine->IsAppThemed()) {
themeEngine->SetWindowTheme((HWND)win->GetHWND(), L"Explorer", NULL);
}
}