How to determine the column No. in CListView when user right-clicked the list header?
-
I'm working to let the program know the column No. which user right-clicked the ListView in the HeadCtrl area. There is HitTest() method in CListCtrl class to determine the item No. for a given position, but I can not find the same way in CHeadCtrl. Can anybody tell me what should I do?
Lisoft
-
I'm working to let the program know the column No. which user right-clicked the ListView in the HeadCtrl area. There is HitTest() method in CListCtrl class to determine the item No. for a given position, but I can not find the same way in CHeadCtrl. Can anybody tell me what should I do?
Lisoft
\\......... ON_NOTIFY_REFLECT(LVN_COLUMNCLICK, OnColumnClick) \\......... void CSortListCtrl::OnColumnClick( NMHDR* pNMHDR, LRESULT* pResult ) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; const int iColumn = pNMListView->iSubItem; *pResult = 0; }