VS2010中,ON_WM_NCHITTEST宏编译不过,报错信息如下:


error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CMenuBar::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)' Cast from base to derived requires dynamic_cast or static_cast

 

为了修改这个bug,我们把

afx_msg UINT OnNcHitTest(CPoint point);


改成

afx_msg LRESULT OnNcHitTest(CPoint point);

 

 

另外,VC6 和 VS2003 转换到VS2010 时可能会遇到的问题以及解决方法:

http://blog.sina.com.cn/s/blog_4add390001000ac0.html

相关文章:

  • 2021-10-01
  • 2022-01-22
  • 2021-09-11
  • 2022-02-25
  • 2021-09-17
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-17
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-05-14
相关资源
相似解决方案