The MFC Wizard created a project with a CWorkSpaceBar
which in my case is actually based on CBCGPDockingControlBar
, the MFC equivalent is CDockablePane
. The wizard also created a m_wndTree based on CBCGPTreeCtrl
(CTreeCtrl
). It created it in its OnCreate()
like this:
CRect rectDummy;
rectDummy.SetRectEmpty();
// Create tree control:
const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS;
if (!m_wndTree.Create(dwViewStyle, rectDummy, this, 1))
{
TRACE0("Failed to create workspace view\n");
return -1; // fail to create
}
Now I would like to handle some of the TreeView notifications so I added these to the CWorkSpaceBar
message map:
ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, &CWorkSpaceBar::OnTvnItemExpanding)
ON_NOTIFY_REFLECT(TVN_GETDISPINFO, &CWorkSpaceBar::OnTvnGetDispInfo)
However, I'm not getting the notification messages? Is there something else I need to do to make it work?