Shen was able to figure out my problem, which was looking back, was pretty trivial. Perhaps this will help others who may have the same question.
In the MDI w / visual studio program that I created from Visual Studio 2010, CFileView has a child instance of CViewTree. CViewTree was obtained from CTreeCtrl.
By default, MFC already sends messages to the child-parent chain. The answer is to determine the identifier of the control to receive notifications in the parent class.
So, firstly, we need to know the identifier of the tree. In the OnCreate CFileView method, you can see this code:
if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4))
For Create MSDN method for Create method:
virtual BOOL Create( DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );
In my example, id is 4. Now in the parent (CFileView in this case) just create the ON_NOTIFY macro as such:
BEGIN_MESSAGE_MAP(CFileView, CDockablePane)
I had to type the line above manually because the master of the class or message property for the parent did not have the message = TVN_SELCHANGED. Then, make sure that the OnSelChanged handler method is declared in the CFileView.h file as follows:
afx_msg void OnSelChanged(NMHDR *pNMHDR, LRESULT *pResult);
Now I can process a TVN_SELCHANGED message like this (back to CFileView.cpp):
void CFileView::OnSelChanged(NMHDR *pNMHDR, LRESULT *pResult) { HTREEITEM item = m_wndFileView.GetSelectedItem(); AfxMessageBox(m_wndFileView.GetItemText(item)); }