Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , I want to split the SDI moudle view into three part , howerer it doesn't show within the right way , the height of two top parts is zero , what's wrong ?

I add code in function OnCreateClient:
C++
    CRect rect;
GetClientRect(&rect);
if ( NULL == m_wndSplitter1.CreateStatic( this,2,1 )) return false;
//m_wndSplitter1.CreateView(0,0,  RUNTIME_CLASS(TView), CSize(rect.Width(),rect.Height()-rect.Height()/4), pContext);

m_wndSplitter1.CreateView(1,0, RUNTIME_CLASS(VEDView),CSize(rect.Width()/2,                 rect.Height()/4),pContext);
m_wndSplitter2.CreateStatic( &m_wndSplitter1,1,2 ,WS_CHILD|WS_VISIBLE,m_wndSplitter1.IdFromRowCol(0,0) );
m_wndSplitter2.CreateView(0,0,  RUNTIME_CLASS(TView), CSize(rect.Width()/3,                 rect.Height()-rect.Height()/4), pContext);
m_wndSplitter2.CreateView(0,1,  RUNTIME_CLASS(TView), CSize(rect.Width() - rect.Width()/3,  rect.Height()-rect.Height()/4), pContext);
return true;



should I change somewhere else ?
Posted

1 solution

you created the m_wndSplitter2 three times ??? you better use m_wndSplitter3 and m_wndSplitter4
 
Share this answer
 
Comments
Younth 20-Oct-11 5:07am    
not exactly, I used 2 splitter instances , the first one splitted the frame view into 2 parts ,a top one and a bottom one. the second splitter splitted the top part into 2 other part , one left and one right
Younth 20-Oct-11 5:08am    
the problem is when the form presentted , the bottom part's height is zero , why?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900