Urgent help needed
-
I am trying to embed view inside custom tab
More like DiLascia tab.....
So far
SDIFrame
CMyView
CList
CStatic
....
CFolderTab
CView1
CEditN
CView2
.....Create CView1/CView2
CRect rectDummy(0, 0, 0, 0);
CreateContext cc;
ZeroMemory(&cc, sizeof(cc));
m_pView1 = (CView1 *)RUNTIME_CLASS(CView1)->CreateObject();
if (!m_pView1 ||
!((CWnd *)m_pView1 )->Create(NULL, NULL, WS_CHILD,
rectDummy, m_pFlatTabCtrl, IDC_CONNECTION_G_PROPERTIES, &cc))
{
TRACE0( "Failed to create View1.\n" );
return -1;
}
folderTab.AddPage(0,m_pView1);View looks fine and DDX*, DDV work in View1,
But when focus set to CEditN within CView1 no messages routed to CMyView.
What am I missing?
-
I am trying to embed view inside custom tab
More like DiLascia tab.....
So far
SDIFrame
CMyView
CList
CStatic
....
CFolderTab
CView1
CEditN
CView2
.....Create CView1/CView2
CRect rectDummy(0, 0, 0, 0);
CreateContext cc;
ZeroMemory(&cc, sizeof(cc));
m_pView1 = (CView1 *)RUNTIME_CLASS(CView1)->CreateObject();
if (!m_pView1 ||
!((CWnd *)m_pView1 )->Create(NULL, NULL, WS_CHILD,
rectDummy, m_pFlatTabCtrl, IDC_CONNECTION_G_PROPERTIES, &cc))
{
TRACE0( "Failed to create View1.\n" );
return -1;
}
folderTab.AddPage(0,m_pView1);View looks fine and DDX*, DDV work in View1,
But when focus set to CEditN within CView1 no messages routed to CMyView.
What am I missing?
BOOL CMyView::PreTranslateMessage(MSG* pMsg) { if( pMsg->message == WM_SETFOCUS && pMsg->hwnd == m_edit.GetSafeHwnd() ) // CEditN: m_edit { // add your codes } return CView::PreTranslateMessage(pMsg); }