Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
when I use the splitter to cut the SDI into a plurality of window, the first column of the new view is not show,it needs to be pulled to show itself. I don't know why. Is there has someone to help me?

C++
CRect rect;
GetClientRect(&rect);
if(!m_split1.CreateStatic(this, 1, 3))
    return FALSE;

if(!m_split1.CreateView(0, 1,RUNTIME_CLASS(CSatelitterView), CSize(rect.Width()/3, rect.Height()), pContext))
    return FALSE;

if(!m_split2.CreateStatic(&m_split1, 2, 1, WS_CHILD|WS_VISIBLE| WS_BORDER,m_split1.IdFromRowCol(0, 0)) )
    return FALSE;

if(!m_split3.CreateStatic(&m_split1, 2, 1, WS_CHILD|WS_VISIBLE |WS_BORDER,m_split1.IdFromRowCol(0, 2)) )
    return FALSE;

if(!m_split2.CreateView(0, 0,RUNTIME_CLASS(CView3), CSize(rect.Width()/3, rect.Height()/2), pContext))
    return FALSE;

if(!m_split2.CreateView(1, 0,RUNTIME_CLASS(CSN_RatioView), CSize(rect.Width()/3, rect.Height()/2), pContext))
    return FALSE;

if(!m_split3.CreateView(0, 0,RUNTIME_CLASS(CView1), CSize(rect.Width()/3, rect.Height()/2), pContext))
    return FALSE;
if(!m_split3.CreateView(1, 0,RUNTIME_CLASS(CView2), CSize(rect.Width()/3, rect.Height()/2), pContext))
    return FALSE;
Posted
Updated 18-Nov-12 16:48pm
v2

1 solution

You don't specify the size of the first pane of m_split1.
Call SetColumnInfo passing the ideal Width for the first column (index = 0) on m_split1, like this:
C++
m_split1.SetColumnInfo(0, rect.Width()/3, 10);
 
Share this answer
 

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