I'm trying to change the name of a ClistCtrl column once you click on
it. All I really want to know is how to get the ID or index of the
clicked column. Here is the code that I used but GetDlgCtrlId doesn't
work, it returns 0 everytime.

void CcolumntestDlg::OnLvnColumnclickList1(NMHDR *pNMHDR, LRESULT

LVCOLUMN lvColumn;
LPNMLISTVIEW pNMLV = reinterpret_cast(pNMHDR);
CHeaderCtrl *pHeaderCtrl = m_List.GetHeaderCtrl();
x = pHeaderCtrl->GetDlgCtrlID(); // x is type int
*pResult = 0;