资源说明:选中ListCtrl中的Checkbox并以高亮显示
void CAlarmType::OnLvnItemchangedTypelist(NMHDR *pNMHDR, LRESULT *pResult)
{
// TODO: 在此添加控件通知处理程序代码
NM_LISTVIEW* pNMListView=(NM_LISTVIEW*)pNMHDR;
if (pNMListView->iItem != -1)
{ if ((pNMListView->uOldState & INDEXTOSTATEIMAGEMASK(1)) && (pNMListView->uNewState & INDEXTOSTATEIMAGEMASK(2)))
{ m_lstRole.SetItemState(pNMListView->iItem, LVIS_SELECTED, LVIS_SELECTED); }
else if ((pNMListView->uOldState & INDEXTOSTATEIMAGEMASK(2)) && (pNMListView->uNewState & INDEXTOSTATEIMAGEMASK(1)))
{ m_lstRole.SetItemState(pNMListView->iItem, 0, LVIS_SELECTED); }
}
*pResult=0;
}
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。