b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

c 中cformview头文件_cformview_base class undefined(2)

电脑杂谈  发布时间:2017-02-17 08:40:24  来源:网络整理

returnCWnd::OnMouseActivate(pDesktopWnd,nHitTest,message);

}

voidCFormViewPrint::OnDestroy()

{

CWnd::OnDestroy();

//TODO:Addyourmessagehandlercodehere

}

voidCFormViewPrint::PostNcDestroy()

{

//TODO:Addyourspecializedcodehereand/orcallthebaseclass

CWnd::PostNcDestroy();

}

voidCFormViewPrint::OnActivateFrame(UINTnState,CFrameWnd*pDeactivateFrame)

{

//TODO:Addyourspecializedcodehereand/orcallthebaseclass

CWnd::OnActivateFrame(nState,pDeactivateFrame);

}

原因可参考

View和Control的区别(如何在对话框上使用CView类)

CView继承类,和其他窗口类的区别,很重要的就是对CDocument类和CFrameWnd类的操作,而其中,涉及CDocument类的操作,都进行了有效性判断(m_pDocument != NULL),CView类初始化的时候,m_pDocument = NULL,因此并不影响CView类作为控件的使用。涉及CFrame类的操作,有这么几个地方:

第一个地方:CView::OnDestroy()。cformview

void CView::OnDestroy()

{

CFrameWnd* pFrame = GetParentFrame();

if (pFrame != NULL && pFrame->GetActiveView() == this)

pFrame->SetActiveView(NULL);//deactivate during death

CWnd::OnDestroy();

}

cformview_c  中cformview头文件_base class undefined

第二个地方:CView::OnActivateFrame()。

void CView::OnActivateFrame(UINT , CFrameWnd* )

{

}

这里,其实是空的,在CView继承类中,只有CFormView类继承了这个虚函数

void CFormView::OnActivateFrame(UINT nState, CFrameWnd* )

{

if (nState == WA_INACTIVE)

SaveFocusControl();// save focus whenframe loses activation

}

实际上都不需要真的CFrame指针,对CView类作为控件使用没有障碍。

第三个地方:CView::OnMouseActivate()。cformview

int CView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)

{

int nResult = CWnd::OnMouseActivate(pDesktopWnd, nHitTest, message);

if (nResult == MA_NOACTIVATE || nResult == MA_NOACTIVATEANDEAT)

return nResult;// frame does not want to activate


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-32922-2.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...