技术栈
选中背景
wuchen1004
1 个月前
mfc
·
clistctrl
·
选中背景
MFC 的 CListCtrl 控件,使用SetItemState 方法来设置选中某个 item,如何达到效果和鼠标点击一致
1)查询到的方法如下:// 假设你要选中第 2 行(索引从 0 开始) int nItem = 1;// 取消所有其他选中项 m_ListCtrl.SetItemState(-1, 0, LVIS_SELECTED);