












获取ListCtrl的行信息。(list)
CString strItem;
POSITION pos;
pos = m_ListIndex.GetFirstSelectedItemPosition();
// 得到项目索引
int IndexInFieldList = m_ListIndex.GetNextSelectedItem(pos);
strItem = m_ListIndex.GetItemText(IndexInFieldList,0);
//
删除所有的行
m_ListIndex.DeleteAllItems();
ListBox:
获取选中行信息:
CString strItem,strType;
int cur = m_ListIndex.GetCurSel();
m_ListIndex.GetText(cur,strItem);
if(strItem.IsEmpty()) return;
删除行:
int c = m_ListIndex.GetCount();
for (int j=0;j<c;j++)
{
m_ListIndex.DeleteString(j);
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。