我看人家的程序,其中有这样一句;
ON_COMMAND_EX(ID_VIEW_HISTOGRAM, OnBarCheck);
在ON_COMMAND后跟个_EX做何解释?我想查找OnBarCheck的定义,结果也找不到,
哪位大虾教我?

解决方案 »

  1.   

    EX就是扩展的意思
    OnBarCheck的定义应该是自己加的在
    //{{AFX_MSG(CView)
    // NOTE - the ClassWizard will add and remove member functions here.
           加入afx_msg void OnBarCheck();
    //    DO NOT EDIT what you see in these blocks of generated code !
    //}}AFX_MSG
    然后自己在加入定义
    void CView::OnBarCheck()
    {
    }
    就可以了
      

  2.   

    我的这条语句:ON_COMMAND_EX(ID_VIEW_HISTOGRAM, OnBarCheck);
    是在CMainFrame.cpp中,但我在CMainFrame.cpp源文件中找不到OnBarCheck()的定义啊?
    而在ON_COMMAND(。)中的函数就能找到!