X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d43d1d73da3d4c690af39466fd1d73889df2db..7848088476db284a94f19eeb24411b45d676ac46:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index d0e958ffc3..44321084d7 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -353,9 +353,7 @@ bool wxListCtrl::Create(wxWindow *parent, // explicitly say that we want to use Unicode because otherwise we get ANSI // versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build -#if wxUSE_UNICODE - ::SendMessage(GetHwnd(), LVM_SETUNICODEFORMAT, TRUE, 0); -#endif + wxSetCCUnicodeFormat(GetHwnd()); // for comctl32.dll v 4.70+ we want to have this attribute because it's // prettier (and also because wxGTK does it like this) @@ -365,11 +363,6 @@ bool wxListCtrl::Create(wxWindow *parent, 0, LVS_EX_FULLROWSELECT); } - // inherit foreground colour but our background should be the same as for - // listboxes and other such "container" windows and not inherited - SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - SetForegroundColour(GetParent()->GetForegroundColour()); - return TRUE; } @@ -548,6 +541,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag) // accessors // ---------------------------------------------------------------------------- +/* static */ wxVisualAttributes +wxListCtrl::GetClassDefaultAttributes(wxWindowVariant variant) +{ + wxVisualAttributes attrs = GetCompositeControlsDefaultAttributes(variant); + + // common controls have their own default font + attrs.font = wxGetCCDefaultFont(); + + return attrs; +} + // Sets the foreground, i.e. text, colour bool wxListCtrl::SetForegroundColour(const wxColour& col) {