如何分屏幕(How to split the Screen)
2004-07-05 14:54
465 查看
********************************************************************/
/* */
/* Function name : OnCreateClient */
/* Description : Create some splitter windows. */
/* */
/********************************************************************/
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
// create splitter window
if (!m_wndSplitter.CreateStatic(this, 2, 1))
return FALSE; // add the second splitter pane - a message view in raw 1
if (!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CTraceView), CSize(0, 0), pContext))
return FALSE; // split the first splitter pane
if (!m_wndSplitter2.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE|WS_BORDER, m_wndSplitter.IdFromRowCol(0, 0)))
{
return FALSE;
}; // add default view to the first pane
if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CFtpTreeView), CSize(100, 100), pContext))
{
return FALSE;
};
// add list view to the second pane
if (!m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CFtpListView), CSize(100, 100), pContext))
{
return FALSE;
}; // remember CTraceView pointer
CWnd* pWnd = m_wndSplitter.GetPane(1, 0);
m_pTraceView = DYNAMIC_DOWNCAST(CTraceView, pWnd); CRect rc;
GetClientRect(&rc); m_wndSplitter.SetRowInfo(0, rc.Height()*3/4, 50);
m_wndSplitter.SetRowInfo(1, rc.Height()/4, 50); m_wndSplitter2.SetColumnInfo(0, 200, 10);
m_wndSplitter2.SetActivePane(0, 0); m_bInitialized = TRUE; // Initialize Tree Control here
// PopulateTree(); m_bShowTrace = AfxGetApp()->GetProfileInt("Settings", "ShowTrace", 1);
if (!m_bShowTrace)
m_wndSplitter.HideRow(1); // show connect dialog
if (AfxGetApp()->GetProfileInt("Settings", "ShowConnectionDlg", 1))
PostMessage(WM_COMMAND, ID_FILE_CONNECT); // save view style
int nViewStyle = AfxGetApp()->GetProfileInt("Settings", "ViewStyle", ID_VIEW_LARGEICON);
OnViewStyle(nViewStyle); return TRUE;
}
/* */
/* Function name : OnCreateClient */
/* Description : Create some splitter windows. */
/* */
/********************************************************************/
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
{
// create splitter window
if (!m_wndSplitter.CreateStatic(this, 2, 1))
return FALSE; // add the second splitter pane - a message view in raw 1
if (!m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CTraceView), CSize(0, 0), pContext))
return FALSE; // split the first splitter pane
if (!m_wndSplitter2.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE|WS_BORDER, m_wndSplitter.IdFromRowCol(0, 0)))
{
return FALSE;
}; // add default view to the first pane
if (!m_wndSplitter2.CreateView(0, 0, RUNTIME_CLASS(CFtpTreeView), CSize(100, 100), pContext))
{
return FALSE;
};
// add list view to the second pane
if (!m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CFtpListView), CSize(100, 100), pContext))
{
return FALSE;
}; // remember CTraceView pointer
CWnd* pWnd = m_wndSplitter.GetPane(1, 0);
m_pTraceView = DYNAMIC_DOWNCAST(CTraceView, pWnd); CRect rc;
GetClientRect(&rc); m_wndSplitter.SetRowInfo(0, rc.Height()*3/4, 50);
m_wndSplitter.SetRowInfo(1, rc.Height()/4, 50); m_wndSplitter2.SetColumnInfo(0, 200, 10);
m_wndSplitter2.SetActivePane(0, 0); m_bInitialized = TRUE; // Initialize Tree Control here
// PopulateTree(); m_bShowTrace = AfxGetApp()->GetProfileInt("Settings", "ShowTrace", 1);
if (!m_bShowTrace)
m_wndSplitter.HideRow(1); // show connect dialog
if (AfxGetApp()->GetProfileInt("Settings", "ShowConnectionDlg", 1))
PostMessage(WM_COMMAND, ID_FILE_CONNECT); // save view style
int nViewStyle = AfxGetApp()->GetProfileInt("Settings", "ViewStyle", ID_VIEW_LARGEICON);
OnViewStyle(nViewStyle); return TRUE;
}
相关文章推荐
- VC与Delphi之间动态链接库互相调用
- ATL实现Connection Point的一种简单的方法
- javascript表单之间的数据传递!
- 如何用VB获得机器的MAC地址
- delphi中的时间操作技术(1)
- delphi中的时间操作技术(2)
- IP地址的隐藏(delphi实现 )
- DirectX.Capture
- 解析IP地址为主机域名
- 将某一主机域名解析为IP地址
- 使用 .NET 框架将现有代码作为 Web 服务提供
- 用VB和MTS开发多层数据库应用系统
- 使用C#开发COM+组件
- 纯编码实现数据库的建立或压缩
- 从数据库中动态选取下拉列表的方法
- 用ASP备份数据库
- thinking in c++ 卷2
- thinking in c++卷2
- InnoDB--------查询IOT B+ Tree的高度
- 关于LoadRunner压测过程中出现的error26601的解释