At this time, studying the sort of ListControl is really big. My situation is to put multiple listcontrol on a Dialog. If you click on one of the columns, you have to sort it, you have found a lot of information on the Internet. Not very clear, I want to come, I don't talk about it. It is too unclear, let people in the clouds, it is really depressed, I have a clear! ! They are not lacking this less, I have walked a lot of wrong roads, 唉 ~~~ ListControl sorted, it is to rely on the parameter item (lvif_param), the callback function is compared, and it is it. At this point, I am asking the expert online, the question is what I am using VC , how do you know where to add that parameters? I have found a lot of places, I finally knew: lv_item lvitem; lvitem.mask = lvif_param; lvitem.iitem = i; // i is a number, claimed, define lvitem.lparam = i; m_list_staresis ketitem (& lvitem); The above content, add to the ListControl plus items, and everything is added. The above is known, good, the turn to the callback function. The callback function, the main problem is that there is no THIS pointer to use it, and I have to contact the current dialog. I have two ways, one is to define the callback function to the friends function, I am not successful, depressed, defined After the static member function, there is a way to point to the current dialog with a global pointer. I tried to define in the header file, the old says have been defined, depressed, try, try, under the CPP file, actually OK , ~~ Well, add that sentence in the initial function: g_dlg = this; call it in the callback function, OK ....... The content of the callback function is as follows: int Callback Cstamdiag :: Comparefunc LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) {CString strItem1 = g_dlg-> m_List_StaResult.GetItemText ((int) lParam1, (int) lParamSort); CString strItem2 = g_dlg-> m_List_StaResult.GetItemText ((int) lParam2, (int) lParamSort ); Int R1 = ATOI (stritem1); int R2 = ATOI (stritem2); if (r1 == r2) return 0; Else {IF (r1> r2) Return -1; else return 1;}} The three parameters mean, 唉 ~~ Toss so much, it is finally good. In view of the first VC , the old bird read more criticism, thank you!