动态创建了树控件,但是不知道如何添加消息

动态创建了树控件,但是不知道怎么添加消息
class CMainFrame : public CFrameWnd
{

public: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:

// Operations
public:

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL

// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif

public:  // control bar embedded members
CStatusBar  m_wndStatusBar;
CToolBar    m_wndToolBar;
CCoolBar m_wndLeft;
CCoolBar m_wndBottom;

CTreeCtrl m_wndTree;
CDlgVideo m_dlgVideo;
// Generated message map functions

public:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnBarLeft();
afx_msg void OnUpdateBarLeft(CCmdUI* pCmdUI);
afx_msg void OnBarBottom();
afx_msg void OnUpdateBarBottom(CCmdUI* pCmdUI);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()

};
里面的m_wndTree对象在
CMainFrame::OnCreate()里面调用了
m_wndTree.Create(WS_VISIBLE|WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_LINESATROOT,CRect(0,0,0,0),&m_wndLeft,1002);
但是不知道怎么加消息,直接把
BEGIN_MESSAGE_MAP(CTreeCtrl,CMainFrame)
END_MESSAGE_MAP()
写上去说CMainFrame这个类收到保护,我把所有的都弄成public了,,还是说收到保护
求大神指点,,消息映射应该写在哪里,子类和父类到底对不对~~~
------解决思路----------------------
工程左边的类树里,指向CMainFrame 类,右边的属性表的头上有对应的消息和像你函数两个按键,找到你想添加的消息或者虚拟函数,点出来就可