Module: wine Branch: master Commit: 6c915fb33639271bb6aa7ec3b273c3af750961de URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c915fb33639271bb6aa7ec3b2...
Author: André Hentschel nerv@dawncrow.de Date: Sun May 24 16:02:38 2009 +0200
comctl32: Add ListView_SetCheckState and ListView_GetCheckState.
---
dlls/comctl32/listview.c | 1 - include/commctrl.h | 5 +++++ 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 14f73d0..129f3cb 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -137,7 +137,6 @@ * -- LVM_SORTGROUPS * * Macros: - * -- ListView_GetCheckSate, ListView_SetCheckState * -- ListView_GetHoverTime, ListView_SetHoverTime * -- ListView_GetISearchString * -- ListView_GetNumberOfWorkAreas diff --git a/include/commctrl.h b/include/commctrl.h index 9428d99..e39f4a2 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3724,6 +3724,11 @@ typedef struct NMLVSCROLL SNDMSG(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEM)&_LVi);} #define ListView_GetItemState(hwnd,i,mask) \ (UINT)SNDMSG((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask)) +#define ListView_SetCheckState(hwndLV, i, bCheck) \ + { LVITEM _LVi; _LVi.state = INDEXTOSTATEIMAGEMASK((bCheck)?2:1); _LVi.stateMask = LVIS_STATEIMAGEMASK; \ + SNDMSG(hwndLV, LVM_SETITEMSTATE, (WPARAM)(UINT)(i), (LPARAM)(LPLVITEM)&_LVi);} +#define ListView_GetCheckState(hwndLV, i) \ + (((UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (i), LVIS_STATEIMAGEMASK) >> 12) - 1) #define ListView_GetCountPerPage(hwnd) \ (BOOL)SNDMSG((hwnd),LVM_GETCOUNTPERPAGE,0,0L) #define ListView_GetImageList(hwnd,iImageList) \