HariDev
HariDev

Reputation: 540

How to collapse all the groups of CListCtrl?

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

Upvotes: 0

Views: 871

Answers (1)

Roman Ryltsov
Roman Ryltsov

Reputation: 69734

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.

Upvotes: 4

Related Questions