#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(NMLVFINDITEM)
#define HAVE_NMLVFINDITEM 1
#elif defined(__DMC__) || defined(NM_FINDITEM)
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(NMLVFINDITEM)
#define HAVE_NMLVFINDITEM 1
#elif defined(__DMC__) || defined(NM_FINDITEM)
{
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
// point to our own m_item
{
// avoid unnecessary dynamic memory allocation, jjust make m_pItem
// point to our own m_item
- COLORREF ref = ListView_GetTextColor(GetHwnd());
- wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref));
- return col;
+ // Use GetDefaultAttributes instead of ListView_GetTextColor because
+ // the latter seems to return black all the time (instead of the theme color)
+ return GetDefaultAttributes().colFg;
case LVN_ODFINDITEM:
// this message is only used with the virtual list control but
// even there we don't want to always use it: in a control with
case LVN_ODFINDITEM:
// this message is only used with the virtual list control but
// even there we don't want to always use it: in a control with
static
wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId)
{
return wxGetInternalData(GetHwndOf(ctl), itemId);
static
wxListItemInternalData *wxGetInternalData(const wxListCtrl *ctl, long itemId)
{
return wxGetInternalData(GetHwndOf(ctl), itemId);
static wxListItemAttr *wxGetInternalDataAttr(wxListCtrl *ctl, long itemId)
{
wxListItemInternalData *data = wxGetInternalData(ctl, itemId);
return data ? data->attr : NULL;
static wxListItemAttr *wxGetInternalDataAttr(wxListCtrl *ctl, long itemId)
{
wxListItemInternalData *data = wxGetInternalData(ctl, itemId);
return data ? data->attr : NULL;
//
// we don't use LVCFMT_COL_HAS_IMAGES because it doesn't seem to
// make any difference in my tests -- but maybe we should?
//
// we don't use LVCFMT_COL_HAS_IMAGES because it doesn't seem to
// make any difference in my tests -- but maybe we should?