From 5737fe6d18e0b3f171749e6870801a2cc50e73aa Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Wed, 16 Apr 2003 23:08:10 +0000 Subject: [PATCH] Fix the ListView_SetItemState macro. --- include/commctrl.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/commctrl.h b/include/commctrl.h index e989ec2171a..2a73934e0b9 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3375,8 +3375,9 @@ typedef struct NMLVSCROLL #define ListView_SetItemW(hwnd,pitem) \ (INT)SNDMSGW((hwnd),LVM_SETITEMW,0,(LPARAM)(const LVITEMW *)(pitem)) #define ListView_SetItem WINELIB_NAME_AW(ListView_SetItem) -#define ListView_SetItemState(hwnd,i,pitem) \ - (BOOL)SNDMSGA((hwnd),LVM_SETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(LPLVITEMA)(pitem)) +#define ListView_SetItemState(hwnd,i,data,dataMask) \ +{ LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\ + SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);} #define ListView_GetItemState(hwnd,i,mask) \ (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask)) #define ListView_GetCountPerPage(hwnd) \