error C2440: “static_cast”: 无法从“UINT (__thiscall CTestDlg::* )(CPoint)”转换为

来源:互联网 发布:大图分割打印软件 编辑:程序博客网 时间:2024/06/01 11:12

从vc6转移到vs2008   发生下面问题:  
  BEGIN_MESSAGE_MAP(CTestDlg,   CCaptionBtnDlg)  
          ON_WM_NCHITTEST()       //vs2005   检测错误在这里  
  END_MESSAGE_MAP()  
   
  afx_msg   UINT   OnNcHitTest(CPoint   point);  
   
  UINT   CTestDlg::OnNcHitTest(CPoint   point)    
  {  
  ....  
  }  

解决方法:

afx_msg   UINT   OnNcHitTest(CPoint   point);     //函数的声明
    
  UINT   CTestDlg::OnNcHitTest(CPoint   point)     //函数的定义
    
  =>  
   
  afx_msg   LRESULT   OnNcHitTest(CPoint   point);   
   
  LRESULT   CTestDlg::OnNcHitTest(CPoint   point)

原创粉丝点击