HRESULT ModifyItemState(
int nIndex, // index of the item to be modified
HRESULTITEM itemID, // item identifier
UINT uAdd, // listview-item state flags
UINT uRemove // listview-item state flags
);
uAdd有如下可选值:
LVIS_CUT
LVIS_DROPHILITED
LVIS_FOCUSED
LVIS_SELECTED
在函数中将第三个参数设为NULL
UINT nState=m_ctrlListCtrl.GetItemState(index,LVIF_STATE);
nState&=!nState;
m_ctrlListCtrl.SetItemState(index,nState,LVIF_STATE);
index是高亮显示行的行号
高亮:
m_LCyichuzu.SetItemState(0,LVIS_DROPHILITED,LVIS_DROPHILITED);