#pragma hdrstop
#endif
-#if wxUSE_LISTCTRL && defined(__WIN95__)
+#if wxUSE_LISTCTRL
#ifndef WX_PRECOMP
#include "wx/app.h"
// versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build
wxSetCCUnicodeFormat(GetHwnd());
+ // We must set the default text colour to the system/theme color, otherwise
+ // GetTextColour will always return black
+ SetTextColour(GetDefaultAttributes().colFg);
+
// for comctl32.dll v 4.70+ we want to have some non default extended
// styles because it's prettier (and also because wxGTK does it like this)
if ( InReportView() && wxApp::GetComCtl32Version() >= 470 )
data->lParam = info.m_data;
// attributes
- if (info.HasAttributes())
+ if ( info.HasAttributes() )
{
- if (data->attr)
- *data->attr = *info.GetAttributes();
+ const wxListItemAttr& attrNew = *info.GetAttributes();
+
+ // don't overwrite the already set attributes if we have them
+ if ( data->attr )
+ data->attr->AssignFrom(attrNew);
else
- data->attr = new wxListItemAttr(*info.GetAttributes());
+ data->attr = new wxListItemAttr(attrNew);
};
};
m_imageListState = imageList;
m_ownsImageListState = false;
}
- ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
+ (void) ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
}
void wxListCtrl::AssignImageList(wxImageList *imageList, int which)
// pszText is not const, hence the cast
lvItem.pszText = (wxChar *)info.m_text.c_str();
if ( lvItem.pszText )
- lvItem.cchTextMax = info.m_text.Length();
+ lvItem.cchTextMax = info.m_text.length();
else
lvItem.cchTextMax = 0;
}
}
#endif // wxUSE_LISTCTRL
-