for (int i = 0; i < mylist4.GetItemCount(); i++) { UINT n = mylist4.GetItemState(i, LVIS_SELECTED);//获取指定行的状态 /* 参数1:int nItem 行号 参数2:UINT nMask 要获取的状态 LVIS_SELECTED=2 选中状态 LVIS_FOCUSED 焦点状态 返回值:如果该行处于nMask的状态,则返回nMask的状态号,否则,返回0 */ str.Format(_T("i=%d n=%d\r\n"),i,n); OutputDebugString(str); }
标签:GetItemState,状态,MFC,CListCtrl,LVIS,获取,nMask From: https://www.cnblogs.com/liming19680104/p/17365182.html