1 void CMaxDifferent::OnNMClickListInfo(NMHDR *pNMHDR, LRESULT *pResult)
2 {
3 LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
4 for(int i=0; i<m_ctrListInfo.GetItemCount(); i++)
5 {
6 if(m_ctrListInfo.GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED )
7 {
8 //ID做位修改的根据
9 m_nID=atoi(m_ctrListInfo.GetItemText(i,0));
10
11 m_strYQName=m_ctrListInfo.GetItemText(i,1);
12 m_strM_DS=m_ctrListInfo.GetItemText(9,2);
13 m_strC_Name=m_ctrListInfo.GetItemText(i,3);
14 m_strM=m_ctrListInfo.GetItemText(i,4);
15 m_strS_F_Name=m_ctrListInfo.GetItemText(i,5);
16 m_nMax=atoi(m_ctrListInfo.GetItemText(i,6));
17 if(m_ctrListInfo.GetItemText(i,7)=="F")
18 {
19 m_ctrB_All=FALSE;
20 }
21 else
22 {
23 m_ctrB_All=TRUE;
24 }
25 UpdateData(FALSE);
26 break;
27 }
28 }
29 *pResult = 0;
30 }
转载于:https://www.cnblogs.com/lanbaoming/archive/2011/08/03/2126263.html