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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top