I am developing an application which has a dialog. On that dialog, I created a tab container. This tab container has two tabs. One has the tree control (CExtWFF<CTreeCtrl>) on it. The dialog box is not getting any notification message (like TVN_SELCHANGED, NM_CLICK) from the tree control. If I use the tree control directly on the dialog then it works. Could you please suggest any solution. Is it a problem? is there any other way of doing. Here is an example how I am using. Please let me know what is wrong.
Thanks.
BEGIN_MESSAGE_MAP(CPolicyEditor, CExtResizableDialog)
//{{AFX_MSG_MAP(CPolicyEditor)
NOTIFY(TVN_SELCHANGED, IDC_TREE_POLICY_EDITOR2, OnSelchangedTreePolicyEditor)
ON_NOTIFY(NM_CLICK, IDC_TREE_POLICY_EDITOR2, OnClickTreePolicyEditor)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CExtTabPageContainerFlatWnd m_tabPolicyEditor;
CExtWFF<CTreeCtrl> m_policytree;
//The following codes are called in OnInitDialog()
m_tabPolicyEditor.Create(
this,
CRect(0,0,0,0));
if( !m_policytree.Create(
WS_CHILD | WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP
|TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT
|TVS_INFOTIP|TVS_DISABLEDRAGDROP
| TVS_SHOWSELALWAYS,
CRect(0,0,0,0),
//rect,
&m_tabPolicyEditor,
//this,
UINT(IDC_TREE_POLICY_EDITOR2)
)
)
{
TRACE0("Failed to create TreeCtrl\n");
return FALSE; // fail to create
}
HICON hIcon = (HICON)::LoadImage( ::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_TREE), IMAGE_ICON, 16, 16, 0 );
VERIFY( m_tabPolicyEditor.PageInsert( &m_policytree, _T("Parameters"), hIcon, true ) );
hIcon = (HICON)::LoadImage( ::AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_LIST), IMAGE_ICON, 16, 16, 0 );
VERIFY( m_tabPolicyEditor.PageInsert( &m_listProperties, _T("Parent Policy"), hIcon, true ) );