Remove checks for the existence of LVCOLUMN::iImage
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774743(v=vs.85).aspx>
This commit is contained in:
parent
6c9b3a8254
commit
fb0a118230
@ -669,16 +669,10 @@ bool wxListCtrl::GetColumn(int col, wxListItem& item) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the column images were not supported in older versions but how to check
|
|
||||||
// for this? we can't use _WIN32_IE because we always define it to a very
|
|
||||||
// high value, so see if another symbol which is only defined starting from
|
|
||||||
// comctl32.dll 4.70 is available
|
|
||||||
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
|
|
||||||
if ( item.m_mask & wxLIST_MASK_IMAGE )
|
if ( item.m_mask & wxLIST_MASK_IMAGE )
|
||||||
{
|
{
|
||||||
item.m_image = lvCol.iImage;
|
item.m_image = lvCol.iImage;
|
||||||
}
|
}
|
||||||
#endif // LVCOLUMN::iImage exists
|
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
@ -2501,12 +2495,10 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef NM_CUSTOMDRAW
|
|
||||||
case NM_CUSTOMDRAW:
|
case NM_CUSTOMDRAW:
|
||||||
*result = OnCustomDraw(lParam);
|
*result = OnCustomDraw(lParam);
|
||||||
|
|
||||||
return *result != CDRF_DODEFAULT;
|
return *result != CDRF_DODEFAULT;
|
||||||
#endif // _WIN32_IE >= 0x300
|
|
||||||
|
|
||||||
case LVN_ODCACHEHINT:
|
case LVN_ODCACHEHINT:
|
||||||
{
|
{
|
||||||
@ -2656,13 +2648,10 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
wxStrlcpy(lvi.pszText, text.c_str(), lvi.cchTextMax);
|
wxStrlcpy(lvi.pszText, text.c_str(), lvi.cchTextMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
// see comment at the end of wxListCtrl::GetColumn()
|
|
||||||
#ifdef NM_CUSTOMDRAW
|
|
||||||
if ( lvi.mask & LVIF_IMAGE )
|
if ( lvi.mask & LVIF_IMAGE )
|
||||||
{
|
{
|
||||||
lvi.iImage = OnGetItemColumnImage(item, lvi.iSubItem);
|
lvi.iImage = OnGetItemColumnImage(item, lvi.iSubItem);
|
||||||
}
|
}
|
||||||
#endif // NM_CUSTOMDRAW
|
|
||||||
|
|
||||||
// even though we never use LVM_SETCALLBACKMASK, we still
|
// even though we never use LVM_SETCALLBACKMASK, we still
|
||||||
// can get messages with LVIF_STATE in lvi.mask under Vista
|
// can get messages with LVIF_STATE in lvi.mask under Vista
|
||||||
@ -2770,9 +2759,6 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
// custom draw stuff
|
// custom draw stuff
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// see comment at the end of wxListCtrl::GetColumn()
|
|
||||||
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
|
|
||||||
|
|
||||||
static RECT GetCustomDrawnItemRect(const NMCUSTOMDRAW& nmcd)
|
static RECT GetCustomDrawnItemRect(const NMCUSTOMDRAW& nmcd)
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
@ -3057,8 +3043,6 @@ WXLPARAM wxListCtrl::OnCustomDraw(WXLPARAM lParam)
|
|||||||
return CDRF_DODEFAULT;
|
return CDRF_DODEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NM_CUSTOMDRAW supported
|
|
||||||
|
|
||||||
// Necessary for drawing hrules and vrules, if specified
|
// Necessary for drawing hrules and vrules, if specified
|
||||||
void wxListCtrl::OnPaint(wxPaintEvent& event)
|
void wxListCtrl::OnPaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
@ -3460,8 +3444,6 @@ static void wxConvertToMSWListCol(HWND hwndList,
|
|||||||
lvCol.cx = item.m_width;
|
lvCol.cx = item.m_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
// see comment at the end of wxListCtrl::GetColumn()
|
|
||||||
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
|
|
||||||
if ( item.m_mask & wxLIST_MASK_IMAGE )
|
if ( item.m_mask & wxLIST_MASK_IMAGE )
|
||||||
{
|
{
|
||||||
lvCol.mask |= LVCF_IMAGE;
|
lvCol.mask |= LVCF_IMAGE;
|
||||||
@ -3495,7 +3477,6 @@ static void wxConvertToMSWListCol(HWND hwndList,
|
|||||||
|
|
||||||
lvCol.iImage = item.m_image;
|
lvCol.iImage = item.m_image;
|
||||||
}
|
}
|
||||||
#endif // _WIN32_IE >= 0x0300
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_LISTCTRL
|
#endif // wxUSE_LISTCTRL
|
||||||
|
Loading…
Reference in New Issue
Block a user