希望这不是MFC的BUG。
CMainFrame* cFrm = (CMainFrame*)::AfxGetMainWnd();
CString strValue1 = cFrm->mcListCtrl.GetItemText(int(lParam1),cFrm->Column);
CString strValue2 = cFrm->mcListCtrl.GetItemText(int(lParam2),cFrm->Column);
int a = atoi(strValue1);
int b = atoi(strValue2);
if( a==b ) return 0;
return a>b? 1: -1;
我跟踪了排序,它得到了:703》558》400》92
但是,显示的时候却变成了,703在前,400随后,然后是92,最后是558,
怎么回事?