I'm confused. The LVITEM structure states:
state
Type: UINT
Indicates the item's state, state image, and overlay image. The stateMask member indicates the valid bits of this member.
Bits 0 through 7 of this member contain the item state flags. This can be one or more of the item state values.
So my question is, what are bits 0 through 7 for? They appear not to indicate what is used by the other bits, otherwise the stateMask wouldn't be needed.