VS2010中,ON_WM_NCHITTEST宏编译不过的修改方法

来源:互联网 发布:mac 强制关机 编辑:程序博客网 时间:2024/06/16 06:38


转 http://www.cnblogs.com/lingshaohu/archive/2011/12/07/2279904.html

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

原创粉丝点击