我在用VC做窗口分割时,已经能够达到分割窗口的效果.
但是,在初始化的时候,窗口分割的比例不是想象中的那样,
出现的情况是分隔条老是紧贴这窗口的上边缘
比如说左右分割4:6的时候就不能按照这个比例来显示
调节CSize也不能实现.
现在要实现的是上下分两个窗口,上面的窗口再分左右两个,BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
// 创建拆分器窗口
if (!m_wndSpitter.CreateStatic(this, 1, 2))
return FALSE;
if (!m_wndSpitter.CreateView(0, 0, RUNTIME_CLASS(CSSplitView), CSize(228, 100), pContext) ||
!m_wndSpitter.CreateView(0, 1, RUNTIME_CLASS(CArtView), CSize(100, 100), pContext))
{
m_wndSpitter.DestroyWindow();
return FALSE;
} return TRUE;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}请求高手解决, 散分
但是,在初始化的时候,窗口分割的比例不是想象中的那样,
出现的情况是分隔条老是紧贴这窗口的上边缘
比如说左右分割4:6的时候就不能按照这个比例来显示
调节CSize也不能实现.
现在要实现的是上下分两个窗口,上面的窗口再分左右两个,BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
// 创建拆分器窗口
if (!m_wndSpitter.CreateStatic(this, 1, 2))
return FALSE;
if (!m_wndSpitter.CreateView(0, 0, RUNTIME_CLASS(CSSplitView), CSize(228, 100), pContext) ||
!m_wndSpitter.CreateView(0, 1, RUNTIME_CLASS(CArtView), CSize(100, 100), pContext))
{
m_wndSpitter.DestroyWindow();
return FALSE;
} return TRUE;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}请求高手解决, 散分
m_wndSplitter.RecalcLayout();
return FALSE; m_wndSplitter1.CreateView(1, 0, RUNTIME_CLASS(CView1),CSize(100, 100),pContext); if(m_wndSplitter2.CreateStatic(&m_wndSplitter1,1, 2,WS_CHILD|WS_VISIBLE,
m_wndSplitter1.IdFromRowCol(0, 0))==NULL)
return FALSE; m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CView1),CSize(400, 300),pContext); m_wndSplitter2.CreateView(0, 1,RUNTIME_CLASS(CView1),CSize(400, 300),pContext); CRect rcClient;
GetClientRect(&rcClient);
m_wndSplitter1.SetRowInfo(0, 350, 100);
m_wndSplitter1.SetRowInfo(1, 200, 100);
m_wndSplitter1.RecalcLayout();