Code: Select all
BOOL CDataChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(! m_wndSplitter.CreateStatic(this, 1, 2))return FALSE;
if(! m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CDataExplorerTree), CSize(nWidth, 0), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateStatic(&m_wndSplitter,3,1,WS_CHILD | WS_VISIBLE | WS_BORDER,m_wndSplitter.IdFromRowCol(0,1)))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CMy1View),CSize(0,300),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CMy2View),CSize(0,200),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
if(! m_wndSplitter2.CreateView(2,0,RUNTIME_CLASS(CMy3View),CSize(0,200),pContext))
{
m_wndSplitter2.DestroyWindow();
return FALSE;
}
return TRUE;
}
Code: Select all
void CDataChildFrame::SomeFunction()
{
CMy2View* pView = (CMy2View*)m_wndSplitter2.GetPane(1,0);
}
Code: Select all
ASSERT_VALID fails with illegal vtable pointer.
Multumesc.