静态切分之后//指定树与列表控件在视图显示的位置GetPane(0,0)函数参数怎么返回全是0,0什么意思?
- C/C++ code
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext){ bool bCreated = m_wndSplitter.CreateStatic(this,1,2); //建立外层架构,一行两列 bCreated = m_wndLeftSplitter.CreateStatic( //建立内层架构,两行一列 &m_wndSplitter, //以外层splitter为父窗体 2,1, WS_CHILD|WS_VISIBLE, m_wndSplitter.IdFromRowCol(0,1) //指定新的splitter占据外层架构的左方格 ); m_wndLeftSplitter.CreateView( 0,0, RUNTIME_CLASS(COtdrClientView), CSize(0,0), pContext ); m_wndLeftSplitter.CreateView( 1,0, RUNTIME_CLASS(CEventView), CSize(0,0), pContext ); m_wndSplitter.CreateView( 0,0, RUNTIME_CLASS(CLeftView), CSize(0,0), pContext ); m_pClientView = (COtdrClientView*)m_wndLeftSplitter.GetPane(0,0); m_pLeftView = (CLeftView*)m_wndSplitter.GetPane(0,0); m_pEventView = (CEventView*)m_wndSplitter.GetPane(0,0); //m_pEventView->SetWindowTextA("报警"); m_bSpliterCreated = bCreated; return bCreated;}[解决办法]
单步看看 各个 Create 是不是成功 ?
[解决办法]
CWnd* GetPane(
int row,
int col
) const;
row
Specifies a row.
col
Specifies a column.