Hi, I have created a treeview at runtime in MFC application , I have added few nodes to it now i want to do some stuff on click of nodes so how i can get click event of treeview ?
My code looks like this :
CTreeCtrl *m_ctlTreeview;
m_ctlTreeview = new CTreeCtrl ;
m_ctlTreeview->Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP |
TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT |
TVS_SINGLEEXPAND | TVS_SHOWSELALWAYS |
TVS_TRACKSELECT,
CRect(25, 60, 385, 260), this, 0x1221);
hparentitem = m_ctlTreeview->InsertItem("Parent",TVI_ROOT);
m_ctlTreeview->InsertItem("Child", hparentitem);