I have the following code that creates splitter windows:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext) {
m_wndSplitter.CreateStatic(this, 1, 2);
CreateShortcutBar();
m_wndSplitter.SetColumnInfo(0, 250,150);
m_wndSplitter2.CreateStatic(&m_wndSplitter, 3, 1, WS_CHILD|WS_VISIBLE, m_wndSplitter.IdFromRowCol(0, 1)); m_wndSplitter2.SetRowInfo(0,220, 200); m_wndSplitter2.SetRowInfo(1,300, 200); m_wndSplitter2.SetRowInfo(2,150, 100);
// splitting trace window into 2 columns m_wndSplitter3.CreateStatic(&m_wndSplitter2, 1, 2, WS_CHILD|WS_VISIBLE, m_wndSplitter2.IdFromRowCol(1, 0)); m_wndSplitter3.SetColumnInfo(0, 300, 200); m_wndSplitter3.SetColumnInfo(1, 300, 200); m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CTopRightFrame), CSize(0, 220), pContext); m_wndSplitter2.CreateView(2, 0, RUNTIME_CLASS(CStatusLoggingFrame), CSize(0, 200), pContext); m_wndSplitter3.CreateView(0, 0, RUNTIME_CLASS(CTraceFrame), CSize(100, 200), pContext); m_wndSplitter3.CreateView(0, 1, RUNTIME_CLASS(CTraceFrame), CSize(100, 200), pContext);
m_pTopRightFrame = (CTopRightFrame*)(m_wndSplitter2.GetPane(0,0)); m_pTopRightFrame->SetDocPtr(m_gpDoc); m_pStatusLoggingFrame = (CStatusLoggingFrame*)(m_wndSplitter2.GetPane(2,0)); m_pTraceFrame1 = (CTraceFrame*)(m_wndSplitter3.GetPane(0,0)); m_pTraceFrame2 = (CTraceFrame*)(m_wndSplitter3.GetPane(0,1)); m_pTraceFrame1->SetDocPtr(m_gpDoc); m_pTraceFrame2->SetDocPtr(m_gpDoc);
m_wndSplitter.SetActivePane(0,0);
return TRUE; }
However, the piece "splitting trace window into 2 columns" does not work for some reason... this is a splitter window within splitter window. When I do not use CSplitterWndEx which is derived from CXTSplitterWnd, then everything works as it should, but I partially lose the style/theme that is provided by CXTSplitterWnd...
Anybody knows what's wrong with CXTSplitterWnd ?
The layout created by this code is:
the red split is where the problem occurs - it shows just one pane instead of 2.
|