Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何以编程方式取消突出显示 MFC CListCtrl 中先前选择的行?
取消选择第 20 项:
YourListCtrl.SetItemState(20, 0, LVIS_SELECTED);
好吧,如果列表视图是报表样式,即多列,则它不起作用。你有什么解决办法吗?
可以将 List 属性设置为:
m_ctlList.SetExtendedStyle(LVS_EX_FULLROWSELECT);
当用户单击该行时,它总是选择特定的行,但是如果程序员在列表视图中删除了一行,则下一行将替换选定的行,并且该行未突出显示。