MFC中为什么有的函数调用时要加上两个冒号
3个回答
展开全部
CSplitterWnd m_wndSplitter;
//重载虚函数OnCreateClient() 在该函数中创建视图
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if(!m_wndSplitter.CreateStatic(this,1,2)) //1行2列
return FALSE;
if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLeftView),CSize(150,0),pContext))
return FALSE;
if(!m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CRightView),CSize(150,0),pContext))
return FALSE;
CRect rect;
GetWindowRect( &rect );
m_wndSplitter.SetColumnInfo(0, rect.Width()/3, 10);
m_wndSplitter.SetColumnInfo(1, rect.Width()*2/3, 10);
m_wndSplitter.RecalcLayout();
return TRUE;
}
//
CLeftView* CMainFrame::GetLeftView()
{
return (CLeftView*)m_wndSplitter.GetPane(0,0);
}
//
CRightView* CMainFrame::GetRightView()
{
return (CRightView*)m_wndSplitter.GetPane(0,1);
}
//重载虚函数OnCreateClient() 在该函数中创建视图
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if(!m_wndSplitter.CreateStatic(this,1,2)) //1行2列
return FALSE;
if(!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CLeftView),CSize(150,0),pContext))
return FALSE;
if(!m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CRightView),CSize(150,0),pContext))
return FALSE;
CRect rect;
GetWindowRect( &rect );
m_wndSplitter.SetColumnInfo(0, rect.Width()/3, 10);
m_wndSplitter.SetColumnInfo(1, rect.Width()*2/3, 10);
m_wndSplitter.RecalcLayout();
return TRUE;
}
//
CLeftView* CMainFrame::GetLeftView()
{
return (CLeftView*)m_wndSplitter.GetPane(0,0);
}
//
CRightView* CMainFrame::GetRightView()
{
return (CRightView*)m_wndSplitter.GetPane(0,1);
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
那是指类成员
追问
能不能具体点
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询