Question

I have created a CListCtrl with groups in it. I need to expand/collapse the group dynamically. How can I achieve that?

Was it helpful?

Solution

LVM_SETGROUPINFO message updates list view group data, including state. And one of the states is:

LVGS_COLLAPSED The group is collapsed.

Hence, you send a message and update the state. MFC wrapper over it is CListCtrl::SetGroupInfo.

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