VS2008 V2010 平台迁移中:error C2440: "static_cast"
来源:互联网 发布:java与或非逻辑符号 编辑:程序博客网 时间:2024/05/01 23:23
error C2440: “static_cast”: 无法从“void (__thiscall C***Dlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
从基类型到派生类型的强制转换需要 dynamic_cast 或 static_cast,搜索发现为开发平台迁移问题。
由vc6.0升级至vs2005以上平台均会遇到这情况,原因为VS2005对消息的检查更为严格,以前在VC6下完全正常运行的消息映射在VS2005及以上平台下编译不通过
修改方法:
更改消息函数定义的返回值afx_msg void 为afx_msg LRESULT 函数名()。
其中LRESULT 是一个数据类型,从窗口函数或回调函数返回的32位值。
- VS2008 V2010 平台迁移中:error C2440: "static_cast"
- vs2008 error C2440: “static_cast”: ……
- error C2440: ’static_cast’
- error C2440: ’static_cast’
- error C2440: ’static_cast’
- error C2440: 'static_cast'
- error C2440: 'static_cast'
- vs2008 error C2440
- vs2008 error C2440: “static_cast”: 无法从“void (__thiscall CMainFrame::* )(void)”转换为“LRESULT (__thiscal
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: 'static_cast' 错误的解决方法
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: ‘static_cast‘ LRESULT LRESULT错误
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: 'static_cast' 错误的解决方法
- vc6.0转换为vs2008后代码编译不通过,error C2440 “static_cast” 无法从“void (__thiscall C* )(void)...
- VC6编写的程序移植到VS2010中编译时error C2440: “static_cast”问题的解决
- libcurl - curl_easy_setopt()(未完,待续)
- 设置时间格式的JSpinner
- 黑马程序员之C#学习笔记:C#索引器与属性的区别、索引器的具体使用
- Fortune-telling with camomile
- 输入身份证自动生成出生日期(2)
- VS2008 V2010 平台迁移中:error C2440: "static_cast"
- 小练1
- 堆栈的详解
- 电话情结
- jsp作业(1)--使用jsp+servlet完成一个表单验证
- aidl项目笔记-入门
- main3-4.c 检验bo3-2.c的主程序
- Visual Studio 2010开发环境安装顺序
- ACM笔记