
1.Clistctrl用过小图标模式来显示这样的文件时,就会出现上图所示的情况。。
这样很不好看,怎么解决哪?其实很简单。。
BOOL SetColumnWidth( int nCol, int cx ); |
Parameters
- nCol
-
Index of the column for which the width is to be set. In list view, this parameter must be 0.
- cx
-
The new width of the column. Can be either LVSCW_AUTOSIZE or LVSCW_AUTOSIZE_USEHEADER, as described in LVM_SETCOLUMNWIDTH in the Platform SDK.
大家可以用这个函数来设置。Clistctrl显示的宽度!!!
这样就能调整界面显示的Items了。。
对于字符串比较长的,大家可以截取字符串用 省略号 来显示。。。具体实现你自己体会吧!!!
本文提供了解决使用CListCtrl显示文件时出现不美观情况的方法,通过使用BOOLSetColumnWidth函数调整列宽,并展示了如何对长字符串进行截取并使用省略号显示。

2392

被折叠的 条评论
为什么被折叠?



