-void wxComboCtrl::OnThemeChange()
-{
- wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
- if ( theme )
- {
- wxUxThemeHandle hTheme(this, L"COMBOBOX");
-
- COLORREF col;
- theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_FILLCOLOR,&col);
- SetBackgroundColour(wxRGBToColour(col));
- theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_TEXTCOLOR,&col);
- SetForegroundColour(wxRGBToColour(col));
- }
- else
- {
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
- SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
- }
-}
-