切成多个窗口 [英] Cut into a plurality of window

查看:56
本文介绍了切成多个窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用拆分器将SDI切成多个窗口时,未显示新视图的第一列,需要将其拉出以显示自身.我不知道为什么有没有人可以帮助我?

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?

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;

推荐答案

您未指定m_split1的第一个窗格的大小.
调用SetColumnInfo传递m_split1上第一列(索引= 0)的理想宽度,如下所示:
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:
m_split1.SetColumnInfo(0, rect.Width()/3, 10);


这篇关于切成多个窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆