https://git.reactos.org/?p=reactos.git;a=commitdiff;h=94112698411c873d1d45bd36a0cb2dd86f2f37c2

commit 94112698411c873d1d45bd36a0cb2dd86f2f37c2
Author:     Giannis Adamopoulos <[email protected]>
AuthorDate: Sun Apr 28 15:55:12 2019 +0300
Commit:     Mark Jansen <[email protected]>
CommitDate: Tue Aug 20 00:43:37 2019 +0200

    [ROSCTRLS.H] Add CListView::SetItemText and CListView::SetCheckState
---
 sdk/include/reactos/rosctrls.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sdk/include/reactos/rosctrls.h b/sdk/include/reactos/rosctrls.h
index e81a0c4cfbb..6dd4ba9fa39 100644
--- a/sdk/include/reactos/rosctrls.h
+++ b/sdk/include/reactos/rosctrls.h
@@ -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));

Reply via email to