1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Updation of values on splitter

Discussion in 'MFC' started by answerme, May 13, 2009.

  1. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    ON my window frame i have used window spliiter .I am sending data on my application I need those values should be updated. But they are getting updated only when i am minimizing my window & then again maximizing it . What i need to do for updation of values on of the splitter

    Code:
    BOOL CSplitter_Main::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
    {
    	// create a splitter with 2 row, 1 columns
    	if (!m_wndSplitter.CreateStatic(this, 2, 1))
    	{
    		TRACE0("Failed to CreateStaticSplitter\n");
    		return FALSE;
    	}
    
    	m_wndSplitter1.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE|WS_BORDER|WS_MAXIMIZE, m_wndSplitter.IdFromRowCol(0, 0)) ;
    
    	// add the first splitter pane - an input view in row 0
        if (!m_wndSplitter1.CreateView(0,0,	RUNTIME_CLASS(CEntityTreeView), CSize(170, 550), pContext))
    	{
    		TRACE0("Failed to create second pane\n");
    		return FALSE;
    	}
    	
    	// add the second splitter pane - the default view  in row 1
        if (!m_wndSplitter1.CreateView(0, 1,	RUNTIME_CLASS(CScenGenView), CSize(150,550), pContext))
    	{
    		TRACE0("Failed to create first pane\n");
    		return FALSE;
    	}
    
    	//Line to split the second column into 3 more rows
    	m_wndSplitter2.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE|WS_BORDER|WS_MAXIMIZE, m_wndSplitter.IdFromRowCol(1, 0)) ;
    
    	if(!m_wndSplitter2.CreateView(0, 0,	RUNTIME_CLASS(CEntityListView), CSize(800, 200), pContext))
    	{
    		TRACE0("Failed to create first pane\n");
    		return FALSE;
    	}
    	[B]if(!m_wndSplitter2.CreateView(0, 1,	RUNTIME_CLASS(CEntityDetailInfoView), CSize(800, 200), pContext))
    	{
    		TRACE0("Failed to create first pane\n");
    		return FALSE;
    	}[/B]  [I][U]THIS SPLITTER2 NEED TO CHANGE THE VALUES[/U][/I]
    	
    	m_wndSplitter.SetRowInfo(0, 700, 500) ;
    	// activate the input view
    	SetActiveView((CView*)m_wndSplitter1.GetPane(0,1));
    
    	return TRUE;
    
    	//return CMDIChildWnd::OnCreateClient(lpcs, pContext);
    }
     
    Last edited by a moderator: May 13, 2009
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Probably you should send the paint message and see if it works
     

Share This Page