Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4627356
  • 博文数量: 671
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 7310
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-14 09:56
文章分类

全部博文(671)

文章存档

2011年(1)

2010年(2)

2009年(24)

2008年(271)

2007年(319)

2006年(54)

我的朋友

分类:

2007-04-14 11:55:34

BOOL CMainFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
 CCreateContext* pContext)
{
 // create a splitter with 1 row, 2 columns
 if (!m_wndSplitter.CreateStatic(this, 1, 2))
 {
  TRACE0("Failed to Splitter window\n");
  return FALSE;
 }

 // add the first splitter pane - the default view in column 0
 if (!m_wndSplitter.CreateView(0, 0,
  pContext->m_pNewViewClass, CSize(150, 150), pContext)
)
 {
  TRACE0("Failed to create first pane\n");
  return FALSE;
 }

 // add the second splitter pane - an input view in column 1
 if (!m_wndSplitter.CreateView(0, 1,
   RUNTIME_CLASS(CView1), CSize(0, 0), pContext)
)
 {
  TRACE0("Failed to create second pane\n");
  return FALSE;
 }

 // activate the input view
 SetActiveView((CView*)m_wndSplitter.GetPane(0,1));

 return TRUE;
}

注意事项:
 
   1、CreateView只能用在用CreateStatic方法创建的CSplitterWnd类窗口。
 
   2、在CreateStatic方法里初始化了几个Panel就用调用几次CreateView。
阅读(1612) | 评论(0) | 转发(0) |
0

上一篇:系统托盘控制

下一篇:宏指令汇编的格式

给主人留下些什么吧!~~