文章类型: |
VC&C++ |
关键词: |
CSizingControlBar,Error,C2440,static_cast,无法从,UINT,(__thiscall,CSizingControlBarG::*,)(CPoint),转换为>>>,MFC |
内容摘要: |
CSizingControlBar Error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBarG::* )(CPoint)”转换为>>> |
CSizingControlBar Error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBarG::* )(CPoint)”转换为>>>
2016/8/4 16:55:38 来源:apple 阅读:
发现CSizingControlBar是一个很好的实现VC界面的类,下来编译出现如下错误:
错误 1 error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBarG::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)” e:\tempstudy\mfcopengl\mfcopengl\scbarg.cpp 57
解决:查看CWnd类
afx_msg LRESULT OnNcHitTest(CPoint point);
而在CSizingControlBar中是 afx_msg UINT OnNcHitTest(CPoint point);
只要将这些UINT 替换为 LRESULT 就OK
原因:因为原作者的代码是VC6的,我用的是VC2005, 可能是版本不同导致的
↑ 上一篇文章:
VS高版本中的MFC中“CException”: 不能实例化抽象类 关键词:VS2010,MFC,CException,不能实例化抽象类 发布日期:2016/8/4 15:38:46
↓ 下一篇文章:
error LNK2026: 模块对于 SAFESEH 映像是不安全的 关键词:error,LNK2026:,模块对于,SAFESEH,.. 发布日期:2016/8/4 16:59:34
相关文章:
VS2015下的MFC工程由于MFC库使用方式与运行时库不一致引起的编译问题 关键词:VC2015,Release,#error,MFC工程的MFC库使用方式与运行时库不一致引起的编.. 发布日期:2018-10-10 14:33
VC在Release出现fatal error C1189:Building MFC application with /MD[d] (CRT dll version) 关键词:VC2015,Release,#error,Building,MFC,application,w.. 发布日期:2018-10-10 14:08
c++error:C2664“intCWnd::MessageBoxW(LPCTSTR,LPCTSTR,UINT)”: 无法将参数 1 从“const char [12]”转换为“LPCTSTR” 关键词:VC,MFC,C++,error,C2664 发布日期:2016-08-16 14:59
相关目录:
.NET,
VC&C++,
软件开发