Hi Folks;
My problem is, that I do not get notified by an Tree-Control inserted into an CExtTabPageContainerFlatWnd.
I subclassed from CExtTabPageContainerFlatWnd and inserted an CTreeCtrl into the TabPageContainer. I expect WM_NOTIFY messages to be sent to MyTabWnd, which ist parent of the TreeCtrl. How do I catch the WM_NOTIFY Message that should be sent by the TreeCtrl when the selection changed?
For clarification(?), here are some code-fragments:
CMyTabWnd : public CExtTabPageContainerFlatWnd
{
public:
Create(CWnd* pParent);
public:
CTreeCtrl m_TreeCtrl;
}
CMyTabWnd::Create(CWnd* pParent)
{
CExtTabPageContainerFlatWnd::Create(pParent);
if( !m_TreeCtrl.Create(
WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP
|TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT
|TVS_INFOTIP|TVS_DISABLEDRAGDROP
|TVS_SINGLEEXPAND|TVS_SHOWSELALWAYS
, CRect(0,0,0,0), this, UINT(IDC_STATIC) )
)
{
TRACE0("Failed to create TreeCtrl\n");
return FALSE; // fail to create
}
m_TreeCtrl.SetFont( CFont::FromHandle( (HFONT)::GetStockObject(DEFAULT_GUI_FONT))
VERIFY( PageInsert( &m_TreeCtrl, _T("Tree") ) );
return TRUE;
}
I tried to overwrite CMyTabWnd::OnNotify(...) but it was never called - overwriting OnHookNotifyMsg(...) did not work either.
Thanks for your help.
Joachim