illegal call of non-static member function请问怎么解决啊
rrorC2352:'CFormView::OnInitialUpdate':illegalcallofnon-staticmemberfunctione:\progra...
rror C2352: 'CFormView::OnInitialUpdate' : illegal call of non-static member function
e:\program files\microsoft visual studio\vc98\mfc\include\afxext.h(747) : see declaration of 'OnInitialUpdate'
程序调用:
void CCommandView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
static int frist=0;
if(frist==0)
{
((CWnd *)(this->GetDlgItem(IDC_AUTOSTART)))->EnableWindow(FALSE);
((CWnd *)(this->GetDlgItem(IDC_AUTOSTOP)))->EnableWindow(FALSE);
……
afcect.h中:
virtual void Dump(CDumpContext& dc) const;
#endif
virtual void OnInitialUpdate();
……
看了网上一些解答,说是调用了静态,用对象::函数,可是还是不知道怎么修改。 展开
e:\program files\microsoft visual studio\vc98\mfc\include\afxext.h(747) : see declaration of 'OnInitialUpdate'
程序调用:
void CCommandView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
static int frist=0;
if(frist==0)
{
((CWnd *)(this->GetDlgItem(IDC_AUTOSTART)))->EnableWindow(FALSE);
((CWnd *)(this->GetDlgItem(IDC_AUTOSTOP)))->EnableWindow(FALSE);
……
afcect.h中:
virtual void Dump(CDumpContext& dc) const;
#endif
virtual void OnInitialUpdate();
……
看了网上一些解答,说是调用了静态,用对象::函数,可是还是不知道怎么修改。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询