Archived

This topic is now archived and is closed to further replies.

PolyFX

MFC CSplitterWindow Problems

Recommended Posts

Hello All Im trying to make a 3D tool, with 3 toolbars, 1 status bar and 4 viewports, but im having problems. I dont know why this isnt working with nested splitters. Heres my code, all in my MainFrame::OnCreateClient() function: GetWindowRect(&cr); m_mainSplitter.CreateStatic( this, 1, 2 ); // create first pane ? m_mainSplitter.CreateView( 0, 0, RUNTIME_CLASS(CGeckoView), CSize( INFOBAR_SIZE, cr.Height() ), pContext ); // insert another splitter for the viewport m_viewportSplitter.CreateStatic( &m_mainSplitter, 2, 2, WS_CHILD | WS_VISIBLE, m_mainSplitter.IdFromRowCol( 0, 0 ) ); // create the 4 viewport panes m_viewportSplitter.CreateView( 0, 0, RUNTIME_CLASS(CGeckoView), CSize( ( cr.Width() - INFOBAR_SIZE ) / 2, cr.Height() / 2 ), pContext ); m_viewportSplitter.CreateView( 0, 1, RUNTIME_CLASS(CGeckoView), CSize( ( cr.Width() - INFOBAR_SIZE ) / 2, cr.Height() / 2 ), pContext ); m_viewportSplitter.CreateView( 1, 0, RUNTIME_CLASS(CGeckoView), CSize( ( cr.Width() - INFOBAR_SIZE ) / 2, cr.Height() / 2 ), pContext ); m_viewportSplitter.CreateView( 1, 1, RUNTIME_CLASS(CGeckoView), CSize( ( cr.Width() - INFOBAR_SIZE ) / 2, cr.Height() / 2 ), pContext ); // end code However when i compile this, i get an assertion error in winsplit.cpp, line 364. which has this comment in the file : // panes can be a CWnd, but are usually CViews Im quite new to MFC, so I have no idea why this wont work. Someone please tell me whats wrong :\ Thanks

Share this post


Link to post
Share on other sites