Snippet below is from my WM_NOTIFY handler.
My ListView control has LVS_EX_CHECKBOXES flag.

mov eax, lParam

mov eax, (NMHDR ptr [eax]).hwndFrom
.if eax == hwndListView
mov eax, lParam
assume eax:ptr NMHDR
.if [eax].code == LVN_ITEMCHANGED
assume eax:ptr NM_LISTVIEW
mov edx, [eax].uOldState
mov ecx, [eax].uNewState
. . . . .
assume eax:nothing

edx and ecx switches between 1000h and 2000h as i check/uncheck list view's check box.
1000h for unchacked and 2000h for checked state.
I looked up thorough MSDN and API ref, but found nothing.
I know it's easy, but cannot figure it out anyhow, what flags are those values?
Posted on 2002-09-09 13:52:25 by Four-F

The checkboxes are state images and their state is determined by the current state image. This state image index is stored in bits 12 through 15 of the state value. In C++, the INDEXTOSTATEIMAGEMASK macro can be used to convert the state image index to the right mask:

#define INDEXTOSTATEIMAGEMASK(i) ((i) << 12)

Posted on 2002-09-09 14:08:25 by Thomas