From: Vadim Zeitlin Date: Tue, 26 Jan 2010 09:00:55 +0000 (+0000) Subject: Make wxWindow::MSWGetThemeColour() const. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/108694fe19d74e9ee8a9b167af0e04c3cc987b2b Make wxWindow::MSWGetThemeColour() const. There doesn't seem to be any reason for this method to not be const. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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 (