我的意思是點擊treeview元素 - >它顯示在列表視圖中。CTreeViewCtrl的獲取點擊事件
我創造這樣的控件(這裏的樹和列表 - > CTreeViewCtrl和CListViewCtrl)
split.Create(*this,rcDefault,NULL,0,WS_EX_CLIENTEDGE);
RECT rlist,rtree;
list.Create(split,rlist,CListViewCtrl::GetWndClassName(),WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | LVS_REPORT | LVS_EDITLABELS, WS_EX_CLIENTEDGE);
tree.Create(split,rtree,CTreeViewCtrl::GetWndClassName(),WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | LVS_REPORT | TVS_EDITLABELS, WS_EX_CLIENTEDGE);
list.AddColumn(L"KEY",0);
list.AddColumn(L"VALUE",1);
split.SetSplitterPanes(tree,list);
哪些參數將有事件的功能?
'MESSAGE_HANDLER(WM_NOTIFY,OnClickItem)'?並在OnClickIted我應該與TVN_SELCHANGED? – 2012-01-11 20:15:02
'NOTIFY_HANDLER_EX(IDC_TREE_EXPLORER,TVN_SELCHANGED,OnExplorerTreeSelChanged)',請參閱http://forum.sources.ru/index.php?showtopic=274194&hl= – 2012-01-11 21:25:07
但我沒有IDC_TREE_EXPLORER – 2012-01-11 23:18:04