如何分屏幕(How to split the Screen)
2005-03-03 14:10
363 查看
********************************************************************/
/* */
/* 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;
}
相关文章推荐
- 如何分屏幕(How to split the Screen)
- [转]如何分屏幕(How to split the Screen)
- How to fill the background with image in landscape in IOS? 如何使image水平铺满屏幕
- How to change the Windows Messenger(MSN)'s personal information using C++ - 用C++如何设置Windows Messenger(MSN)的个人信息
- In the company, how to write an E-mail(在公司里,如何写好一封电子邮件)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- How To Print a Form That Is Too Large for the Screen or Page
- How to change the language of oracle sqlplus from chinese to english in windows(如何将oracle sql plus中的中文变成英文版)
- How to solve: when using tab in gnomeTerminal , the entire screen flash,
- How to use the Journal Import Correction Screen - from Metalink
- 如何实现标准TCODE的屏幕增强(HOWTO:Implement a screen exit to a standard SAP transaction)
- 译文:如何使用SocketAsyncEventArgs类(How to use the SocketAsyncEventArgs class)
- How to fix the gray screen bug in VirtualBox
- (译)如何使用SocketAsyncEventArgs类(How to use the SocketAsyncEventArgs class)
- [转]how to split the ng-repeat data with three columns using bootstrap
- How to use String.split() to get all the separate words including the delimit (Java)
- 如何窥探PDB的秘密?(How to Inspect the Content of a Program Database (PDB) File)
- How to make Shutter as the default screenshot tool?
- 如何实现标准TCODE的屏幕增强(HOWTO:Implement a screen exit to a standard SAP transaction)
- How to get the password text in a text with password property from another process using C++ - 用C++如何从不同进程获取密码框文本