return text;
}
+ void *GetItemData(int row) const
+ {
+ LVITEM lvi = {0};\r
+ lvi.iItem = row;\r
+ lvi.mask = LVIF_PARAM;\r
+ ::SendMessage(m_hwndListCtrl, LVM_GETITEM, 0, (LPARAM)&lvi);\r
+ return (void *)lvi.lParam;\r
+ }
+
int GetBackColor(int row) const
{
NMLVCUSTOMDRAW nmlvcd = {0};
return nmlvcd.clrTextBk;
}
+ bool IsSelectedItem(int sel) const
+ {
+ return !!ListView_GetItemState(m_hwndListCtrl, sel, LVIS_SELECTED);
+ }
+
+ int GetNextItem(int sel, bool selected = false, bool reverse = false) const
+ {
+ return ListView_GetNextItem(m_hwndListCtrl, sel, (selected ? LVNI_SELECTED : 0) | (reverse ? LVNI_ABOVE : 0));
+ }
+
+ int GetNextSelectedItem(int sel, bool reverse = false) const
+ {
+ return ListView_GetNextItem(m_hwndListCtrl, sel, LVNI_SELECTED | (reverse ? LVNI_ABOVE : 0));
+ }
+
+ unsigned GetSelectedCount() const
+ {
+ return ListView_GetSelectedCount(m_hwndListCtrl);
+ }
+
int GetIndent(int row) const
{
LVITEM item = {0};
DeleteObject(hbmpImage);
return ret;
}
-
+\r
protected:
HWND m_hwndListCtrl;
};