能力值:
( LV7,RANK:140 )
|
-
-
2 楼
对于list控件,MFC也不过是封装了消息而已
|
能力值:
( LV11,RANK:190 )
|
-
-
3 楼
DWORD OldStyle = ListView_GetExtendedListViewStyle(hList);
ListView_SetExtendedListViewStyle(hList, OldStyle | LVS_EX_AUTOSIZECOLUMNS);
SDK帮助文档上对LVS_EX_AUTOSIZECOLUMNS的说明是自动调整列宽度
不知道起不起作用...
|
能力值:
( LV8,RANK:120 )
|
-
-
4 楼
自学成才。
for ( int cnt = 0; cnt < m_maxItems; ++cnt )
{
ListView_SetColumnWidth(GetDlgItem(HOST_LIST),cnt,LVSCW_AUTOSIZE);
int nColumnWidth = ListView_GetColumnWidth(GetDlgItem(HOST_LIST),cnt);
ListView_SetColumnWidth(GetDlgItem(HOST_LIST),cnt,LVSCW_AUTOSIZE_USEHEADER);
int nHeaderWidth = ListView_GetColumnWidth(GetDlgItem(HOST_LIST),cnt);
ListView_SetColumnWidth(GetDlgItem(HOST_LIST),cnt,max(nColumnWidth, nHeaderWidth));
}
|
|
|