简体   繁体   English

如何在MFC的CListCtrl中对项目进行排序?

[英]How to sort Item in CListCtrl in MFC?

I made a Dialog based application in MFC. 我在MFC中制作了一个基于对话框的应用程序。 I put CListCtrl control on my Dialog and set its view style to report type. 我在对话框上放置了CListCtrl控件,并将其视图样式设置为报表类型。 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 谢谢

由于它是MFC, 因此该示例和示例都应该起作用。

List Sorting 清单排序

This works perfectly. 这很完美。 Thanks for your cooperation. 谢谢你的合作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM