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

发现CXXX是一个很好的实现VC界面的类,下来编译出现如下错误:

错误 1 error C2440: “static_cast”: 无法从“UINT (__thiscall CXXX::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”

解决:查看CWnd类

afx_msg LRESULT OnNcHitTest(CPoint point);

而在CSizingControlBar中是  afx_msg UINT OnNcHitTest(CPoint point);

只要将这些UINT 替换为 LRESULT 就OK

原因:因为原作者的代码是VC6或VS2003的,我用的是VC2005或者更高, 可能是版本不同导致的


转:https://blog.csdn.net/zhdd1234/article/details/7037089

猜你喜欢

转载自blog.csdn.net/eric_e/article/details/80591148
今日推荐