Will the CTreeView get this notification?
Hello, I have a frame window with a CSplitterWnd. The splitter window
has two panes. One of the panes is a class derived from CTreeView (which
contains a CTreeCtrl if I'm not mistaken) When the selection in the tree
changes a TCN_SELCHANGE notification is sent to the parent...I thought
the parent in this case would be my CTreeView derived class (named
WindowView) but that doesn't seem to be true because the expression in
the if statement below never evaluates to true no matter how many times
I select an item in the tree...
BOOL
WindowView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT *pResult)
{
NMHDR *nmhdr = reinterpret_cast<NMHDR*>(lParam);
ASSERT(nmhdr);
if (nmhdr->code == TCN_SELCHANGE) // This expression is never true...
{
TRACE("TCN_SELCHANGE\n");
TRACE1("%i\n", nmhdr->idFrom);
}
return CView::OnNotify(wParam, lParam, pResult);
}
It gets notifications, just not the one I'm looking for... why not?
Isn't WindowView parent of its embedded CTreeCtrl? If it isn't does that
mean the CSplitterWnd gets the notfication? I haven't even subclassed
the splitter itself.
- Eric