fix wxComboCtrl colours under Windows Vista (patch 1710006) [backport from HEAD]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-05-11 22:56:00 +00:00
parent 5f1a951b00
commit e07964301a
2 changed files with 13 additions and 5 deletions

View File

@@ -121,6 +121,7 @@ wxMSW:
- Fixed bug in wxThread::Wait() in console applications introduced in 2.8.3
- Support right-aligned/centered owner drawn items in wxListCtrl (troelsk)
- Compilation fixed with WXWIN_COMPATIBILITY_2_6==0
- Fix wxComboCtrl colours under Windows Vista (Kolya Kosenko)
wxGTK:

View File

@@ -164,13 +164,20 @@ void wxComboCtrl::OnThemeChange()
wxUxThemeEngine* theme = wxUxThemeEngine::GetIfActive();
if ( theme )
{
wxUxThemeHandle hTheme(this, L"COMBOBOX");
wxUxThemeHandle hTheme(this, L"EDIT");
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));
HRESULT hr = theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_FILLCOLOR,&col);
if ( FAILED(hr) )
wxLogApiError(_T("GetThemeColor(EDIT, EP_EDITTEXT, ETS_NORMAL, TMT_FILLCOLOR)"), hr);
else
SetBackgroundColour(wxRGBToColour(col));
hr = theme->GetThemeColor(hTheme,EP_EDITTEXT,ETS_NORMAL,TMT_TEXTCOLOR,&col);
if ( FAILED(hr) )
wxLogApiError(_T("GetThemeColor(EDIT, EP_EDITTEXT, ETS_NORMAL, TMT_TEXTCOLOR)"), hr);
else
SetForegroundColour(wxRGBToColour(col));
}
else
{