添加LVN_ITEMCHANGED事件
void CResultPicDlg::OnItemchangedTotalshownList(NMHDR *pNMHDR, LRESULT *pResult) { LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR); // TODO: Add your control notification handler code here NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; CString c_str; if(m_totalShown_list.GetCheck(pNMListView->iItem)==1) { AfxMessageBox("选上"); } else AfxMessageBox("没选上"); *pResult = 0; *pResult = 0; }