How can I catch a click on an item, and then change all it's subitems states?
I know I can get the selected item with GetFirstSelectedItemPosition, but how do I use the SetItemState on the given position?
EDIT: I was basically looking for this: m_ListControl.SetExtendedStyle(LVS_EX_FULLROWSELECT)
Create a notification handler for the
LVN_ITEMCHANGED
notification. This handler will be called whenever a new item has been selected either using the mouse or the keyboard. If you particularly need to handle mouse clicks, create a notification handler for theNM_CLICK
notification instead.Both event handlers'
LPARAM
parameter points to a structure that contains a member callediItem
. This is the index to the item just selected or clicked. Use thisiItem
as the first parameter to theSetItemState
method.