// versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build
wxSetCCUnicodeFormat(GetHwnd());
// versions of _some_ messages (notably LVN_GETDISPINFOA) in MSLU build
wxSetCCUnicodeFormat(GetHwnd());
// 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 )
{
::SendMessage(GetHwnd(), LVM_SETEXTENDEDLISTVIEWSTYLE,
// 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 )
{
::SendMessage(GetHwnd(), LVM_SETEXTENDEDLISTVIEWSTYLE,
- // Use GetDefaultAttributes instead of ListView_GetTextColor because
- // the latter seems to return black all the time (instead of the theme color)
- return GetDefaultAttributes().colFg;
+ COLORREF ref = ListView_GetTextColor(GetHwnd());
+ wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref));
+ return col;
- ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
+ (void) ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
- wxT("List control has an image list, OnGetItemImage should be overridden."));
+ wxT("List control has an image list, OnGetItemImage or OnGetItemColumnImage should be overridden."));
+ return -1;
+}
+
+int wxListCtrl::OnGetItemColumnImage(long item, long column) const
+{
+ if (!column)
+ return OnGetItemImage(item);
+
// pszText is not const, hence the cast
lvItem.pszText = (wxChar *)info.m_text.c_str();
if ( lvItem.pszText )
// pszText is not const, hence the cast
lvItem.pszText = (wxChar *)info.m_text.c_str();
if ( lvItem.pszText )