void CConnecterView::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult) { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; *pResult = 0; CIntClientDoc* pDoc = GetDocument(); //CDocument* pDoc = GetDocument(); // Get a reference to the tree control CTreeCtrl &ctlLeagues = this->GetTreeCtrl(); // Find out what item is selected in the tree HTREEITEM nodSelected = ctlLeagues.GetSelectedItem(); // Get the string of the selected node CString strSelected = ctlLeagues.GetItemText(nodSelected); // Just in case the selected node as a parent, get that parent HTREEITEM nodParentLeague = ctlLeagues.GetParentItem(nodSelected); // Find the string of the parent of the selected node, if it has a parent CString strParentLeague = ctlLeagues.GetItemText(nodParentLeague); // Now you can react depending on the selected node if (strSelected == "Connecter") { //pDoc->CRightView.OnEnChangeEditUserLogin(); }
WM_NOTIFY
TVN_SELCHANGED
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)