工程基于SDI,我要的界面是下面的形式:
------------------------------------- 第一行
_____________________________________
|
|
|
|
2行1列 | 2行2列
|
|
|
|
|
|
|
------------------------------------ 第三行____________________________________
代码是:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//3行,第二行再分为2列
if(!m_wndSplitter.CreateStatic (this,3,1,WS_CHILD|WS_VISIBLE|WS_BORDER))
return FALSE;m_wndSplitter.CreateView(0, 0,RUNTIME_CLASS(CView1), CSize(100, 50),pContext);// 对第2行进行再分割
if (!m_wndSplitter2.CreateStatic(
&m_wndSplitter, // our parent window is the first splitter
1, 2, // the new splitter is 1 rows, 2 column
WS_CHILD | WS_VISIBLE | WS_BORDER, // style, WS_BORDER is needed
m_wndSplitter.IdFromRowCol(1, 0)
//new splitter is in the first row, 2nd column of first splitter))
{
TRACE0("Failed to create nested splitter\n");
return FALSE;
}// int cyText = min(lpcs->cy, 800); // height of text panem_wndSplitter2.CreateView(0, 0,RUNTIME_CLASS(CView2), CSize(1080, 814), pContext);
m_wndSplitter2.CreateView(0, 1,RUNTIME_CLASS(CView3), CSize(200, 814), pContext);m_wndSplitter.CreateView(2, 0,RUNTIME_CLASS(CView4), CSize(100, 100), pContext); return TRUE;
}结果是:
划分的结果是对的,但是第二行显示不出来,第一行和的三行把它挤成一条线了,成下面的形式
-----------------------------------------------
第一行正确显示
_______________________________________________
划分第二行的竖线可以看到一点,但是第二行高度为0
-----------------------------------------------
第三行正确显示
_______________________________________________
请问怎么处理,帮我发到邮箱也可以,[email protected]
完了马上给分。
------------------------------------- 第一行
_____________________________________
|
|
|
|
2行1列 | 2行2列
|
|
|
|
|
|
|
------------------------------------ 第三行____________________________________
代码是:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//3行,第二行再分为2列
if(!m_wndSplitter.CreateStatic (this,3,1,WS_CHILD|WS_VISIBLE|WS_BORDER))
return FALSE;m_wndSplitter.CreateView(0, 0,RUNTIME_CLASS(CView1), CSize(100, 50),pContext);// 对第2行进行再分割
if (!m_wndSplitter2.CreateStatic(
&m_wndSplitter, // our parent window is the first splitter
1, 2, // the new splitter is 1 rows, 2 column
WS_CHILD | WS_VISIBLE | WS_BORDER, // style, WS_BORDER is needed
m_wndSplitter.IdFromRowCol(1, 0)
//new splitter is in the first row, 2nd column of first splitter))
{
TRACE0("Failed to create nested splitter\n");
return FALSE;
}// int cyText = min(lpcs->cy, 800); // height of text panem_wndSplitter2.CreateView(0, 0,RUNTIME_CLASS(CView2), CSize(1080, 814), pContext);
m_wndSplitter2.CreateView(0, 1,RUNTIME_CLASS(CView3), CSize(200, 814), pContext);m_wndSplitter.CreateView(2, 0,RUNTIME_CLASS(CView4), CSize(100, 100), pContext); return TRUE;
}结果是:
划分的结果是对的,但是第二行显示不出来,第一行和的三行把它挤成一条线了,成下面的形式
-----------------------------------------------
第一行正确显示
_______________________________________________
划分第二行的竖线可以看到一点,但是第二行高度为0
-----------------------------------------------
第三行正确显示
_______________________________________________
请问怎么处理,帮我发到邮箱也可以,[email protected]
完了马上给分。
m_wndSplitter2.CreateView(0, 1,RUNTIME_CLASS(ViewA), CSize(200, 81), pContext);
m_wndSplitter.SetRowInfo(1, 200, 100); //Use it to set distance between rows
int row,
int cyIdeal,
int cyMin
);
Parameters
row
Specifies a splitter window row.
cyIdeal
Specifies an ideal height for the splitter window row in pixels.
cyMin
Specifies a minimum height for the splitter window row in pixels.
Res
Call this member function to set a new minimum height and ideal height for a row. The row minimum value determines when the row will be too small to be fully displayed.When the framework displays the splitter window, it lays out the panes in columns and rows according to their ideal dimensions, working from the upper-left to the lower-right corner of the splitter window's client area
m_wndSplitter2.CreateView(0, 0,RUNTIME_CLASS(CView2), CSize(1080, 814), pContext);
m_wndSplitter2.CreateView(0, 1,RUNTIME_CLASS(CView3), CSize(200, 814), pContext);
m_wndSplitter.SetRowInfo(1, 800, 200);