ON_WM_NCHITTEST 问题解决方法

旧时模样 提交于 2019-12-06 07:04:29

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!