Question

How can I catch a click on an item, and then change all it's subitems states?

enter image description here

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)

No correct solution

OTHER TIPS

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 the NM_CLICK notification instead.

Both event handlers' LPARAM parameter points to a structure that contains a member called iItem. This is the index to the item just selected or clicked. Use this iItem as the first parameter to the SetItemState method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top