CListCtrl.. sort on column 2
Posted on 2000-02-04
I have a listctrl in a dialog box. I want to sort if the user clicks on the column. So i mapped the message "LVN_COLUMNCLICK" and call the sort function(which is static member function) and pass pointer to listctrl as the paramter.. as
m_lstFiles.SortItems( SortFunc, &m_lstFiles);
In the sort function how do I get the data in the second column. I tried using GetItemText but returns the text of first column always.? The two columns are FileName and FileSize. I want to sort on file size?
Please write the entire function for me to cut and paste. I have given good points and will consider increasing it..