+#ifndef EP_EDITTEXT
+ #define EP_EDITTEXT 1
+ #define ETS_NORMAL 1
+#endif
+
+wxVisualAttributes
+wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+ // it is important to return valid values for all attributes from here,
+ // GetXXX() below rely on this
+ wxVisualAttributes attrs;
+
+ // FIXME: Use better dummy window?
+ wxWindow* wnd = wxTheApp->GetTopWindow();
+ if (!wnd)
+ return attrs;
+
+ attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+
+ // there doesn't seem to be any way to get the text colour using themes
+ // API: TMT_TEXTCOLOR doesn't work neither for EDIT nor COMBOBOX
+ attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+
+ // NB: use EDIT, not COMBOBOX (the latter works in XP but not Vista)
+ attrs.colBg = wnd->MSWGetThemeColour(L"EDIT",
+ EP_EDITTEXT,
+ ETS_NORMAL,
+ ThemeColourBackground,
+ wxSYS_COLOUR_WINDOW);
+
+ return attrs;
+}
+