Jump to content
  • Advertisement
Sign in to follow this  

MFC splitters

This topic is 5471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i have this trouble with splitters resizing: I've created two viewports - OpenGL, and MFC (screenshot here: http://mantis.desk.pl/PO/media/others/landscape.jpg). When I launch the application everything is in correct sizing, but when i maximize it, the splitter stays in the same place it was on startup (not shown on screenshot). I've been following an article on GameDev to create it (http://www.gamedev.net/reference/articles/article1358.asp) and I've created CMainFrame::OnSize function. However it doesn't seem to work.
void CMainFrame::OnSize(UINT nType, int cx, int cy) 
    CFrameWnd::OnSize(nType, cx, cy);
    CRect cr;

    if (  m_bInitSplitter && nType != SIZE_MINIMIZED )
        m_mainSplitter.SetRowInfo( 0, cy, 0 );
        m_mainSplitter.SetColumnInfo( 0, cx -PANEL_SIZE, 0);
        m_mainSplitter.SetColumnInfo( 1, PANEL_SIZE, 0);

It compiles nicely and all, but doesn't give any effect. Ideas?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!