diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index e946446c55..52bdd1eeb2 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -428,7 +428,7 @@ public: int themePart, int themeState, MSWThemeColour themeColour, - wxSystemColour fallback); + wxSystemColour fallback) const; // gives the parent the possibility to draw its children background, e.g. // this is used by wxNotebook to do it using DrawThemeBackground() diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 67d6be5c16..81b6b93e5b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4739,7 +4739,7 @@ wxColour wxWindowMSW::MSWGetThemeColour(const wchar_t *themeName, int themePart, int themeState, MSWThemeColour themeColour, - wxSystemColour fallback) + wxSystemColour fallback) const { #if wxUSE_UXTHEME const wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive(); @@ -4763,7 +4763,7 @@ wxColour wxWindowMSW::MSWGetThemeColour(const wchar_t *themeName, wxFAIL_MSG(wxT("unsupported theme colour")); }; - wxUxThemeHandle hTheme((wxWindow *)this, themeName); + wxUxThemeHandle hTheme((const wxWindow *)this, themeName); COLORREF col; HRESULT hr = theme->GetThemeColor (