I'm trying to sort a listview when the user clicks on the column header.
I am catching the LVN_COLUMNCLICK notification like so:
case LVN_COLUMNCLICK:
{
NMLISTVIEW* pListView = (NMLISTVIEW*)lParam;
BOOL test = ListView_SortItems ( m_hDuplicateObjectsList, ListViewCompareProc, pListView->iSubItem );
break;
}
However it seems to fail. My test variable is FALSE and my ListViewCompareProc never gets hit (it has a simple return 1 while I am trying to hit a debug point inside of it).
Is there something I am missing for sorting a listview?