VC视图问题 [英] the problem of VC view

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

问题描述

我想将SDI模块视图分为三个部分,但是它没有以正确的方式显示,两个顶部的高度为零,这是怎么回事?

我在函数OnCreateClient中添加代码:

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:

    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 ?

推荐答案

您创建了m_wndSplitter2 3次?您最好使用m_wndSplitter3和m_wndSplitter4
you created the m_wndSplitter2 three times ??? you better use m_wndSplitter3 and m_wndSplitter4


这篇关于VC视图问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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