how to know which column been clicked CListCtrl
-
hi guys i want some info, i have CListCtrl. i want to know whicj column has been clicked by user, if user clicked on a particular column header how to know which column it is,
swarup wrote:
if user clicked on a particular column header how to know which column it is
When a user clickes on the header, it will get the LVN_COLUMNCLICK notication. the lparam is a NMLISTVIEW pointer. The
iSubItem
member of that struct will have the column numbervoid MyDlg::OnColumnclickList1(NMHDR* pNMHDR, LRESULT* pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; int nColumn = pNMListView->iSubItem;// Column user clicked }
nave [OpenedFileFinder]
-
hi guys i want some info, i have CListCtrl. i want to know whicj column has been clicked by user, if user clicked on a particular column header how to know which column it is,
Hi, for the header... I'm not sure, but for normal places... you can check which item (row) is, and compare the subitems (columns). In any case I recommend you to take a look in the CListCtrl articles that are in the site. They would explain you a lot and maybe give you some idea or direct solution.
Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?