How to sort Item in CListCtrl in MFC?

2019-03-06 07:53发布

I made a Dialog based application in MFC. I put CListCtrl control on my Dialog and set its view style to report type. I have five columns in this list view. All columns are of String type. I want to implement the sorting in this list, That is when I click on a column it should sort item in the list. I saw many examples related to this. but none is working for me. Can some one guide me how to do that???

Thanks

2条回答
地球回转人心会变
2楼-- · 2019-03-06 08:33

Since it is MFC, this sample and this sample should work.

查看更多
来,给爷笑一个
3楼-- · 2019-03-06 08:38

List Sorting

This works perfectly. Thanks for your cooperation.

查看更多
登录 后发表回答