ListCtrl

没想到刚挖的坑 就找到土来填了。。。

刚在网上找的方法:

  假设你的Dialog中有:
      CListCtrl m_listctrl;
      在你调用InsertColumn之前,先要输入如下的代码:
       LONG styles;
       styles=GetWindowLong(m_listctrl.m_hWnd,GWL_STYLE);
       SetWindowLong(m_listctrl.m_hWnd,GWL_STYLE,styles | LVS_REPORT);
      这样才能有效。
 
链接http://blog.sina.com.cn/s/blog_4d8b5f450100i0qf.html。
顺便分享一个大佬总结的MFC中ListCtrl的用法:http://www.cppblog.com/xmli/archive/2011/06/11/148482.html
原文地址:https://www.cnblogs.com/Anony-WhiteLearner/p/6562433.html