The CListCtrl control only displays one column and scrolls to display other columns without SetScrollFlags.

The CListCtrl control only displays one column and scrolls to display other columns without SetScrollFlags.

2023/9/5 4:52:58 pm

If you do not want to use the SetScrollFlags function to set the scroll bar style, you can use the following code to set the CListCtrl control to display only one column and support scrolling to display other content:

cpp

// 设置控件样式和属性
m_listCtrl.SetExtendedStyle(LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
m_listCtrl.ModifyStyle(LVS_REPORT, LVS_SINGLESEL);

// 获取列表控件的当前列数,并删除多余列
int nColumnCount 

Guess you like

Origin blog.csdn.net/vv1025/article/details/133050381