[ROSCTRLS.H] Add CListView::SetItemText and CListView::SetCheckState
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 28 Apr 2019 12:55:12 +0000 (15:55 +0300)
committerMark Jansen <mark.jansen@reactos.org>
Mon, 19 Aug 2019 22:43:37 +0000 (00:43 +0200)
sdk/include/reactos/rosctrls.h

index e81a0c4..6dd4ba9 100644 (file)
@@ -183,6 +183,19 @@ public:
         SendMessage(LVM_SETITEMSTATE, i, reinterpret_cast<LPARAM>(&item));
     }
 
+    BOOL SetItemText(int i, int subItem, LPCWSTR text)
+    {
+        LVITEMW item;
+        item.iSubItem = subItem;
+        item.pszText = (LPWSTR)text;
+        return SendMessage(LVM_SETITEMTEXT, i, (LPARAM)&item);
+    }
+
+    void SetCheckState(int i, BOOL check)
+    {
+        SetItemState(i, INDEXTOSTATEIMAGEMASK((check)?2:1), LVIS_STATEIMAGEMASK);
+    }
+
     int HitTest(LV_HITTESTINFO * phtInfo)
     {
         return (int)SendMessage(LVM_HITTEST, 0, reinterpret_cast<LPARAM>(phtInfo));