error C2440: ‘static_cast‘ LRESULT LRESULT错误
来源:互联网 发布:微信扫码支付开发java 编辑:程序博客网 时间:2024/05/02 01:04
最近开发平台由VC6.0升级至VS2005,需要将原有的项目迁移,特将碰到的问题归纳如下:
1消息映射
VS2005对消息的检查更为严格,以前在VC6下完全正常运行的消息映射在VS2005下编译不通过
a. ON_MESSAGE(message,On
On
error C2440: “static_cast”: 无法从“void (__thiscall CPppView::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
在匹配目标类型的范围内没有具有该名称的函数
error C2440: “static_cast”: 无法从“void (__thiscall CPppView::* )(void)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
在匹配目标类型的范围内没有具有该名称的函数
b. ON_COMMAND_EX(id,On
在VS2005中,On
则有错误提示,如在VS6中,On
error C2440: “static_cast”: 无法从“BOOL (__thiscall CMainFrame::* )(void)”转换为“BOOL (__thiscall CCmdTarget::* )(UINT)”
在匹配目标类型的范围内没有具有该名称的函数
error C2440: “static_cast”: 无法从“BOOL (__thiscall CMainFrame::* )(void)”转换为“BOOL (__thiscall CCmdTarget::* )(UINT)”
在匹配目标类型的范围内没有具有该名称的函数.
答!: 1:
错误1error C2440: “static_cast”: 无法从“int (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”d:\sysdemosource\demodlg.cpp141
错误2error C2440: “static_cast”: 无法从“int (__thiscall CHKVisionDlg::* )(UINT,INT)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”d:\sysdemosource\demodlg.cpp142
答!: 2:
将 On
afx_msg LRESULT On
On
答!: 3:
ON_REGISTERED_MESSAGE(MsgUpdateCounters, On
ON_REGISTERED_MESSAGE(MsgDataReady, On
这个是你手动加进来的吗??
答!: 4:
这个我觉得是你自己手动添加的~~~
那么要在头文件中将:
On
afx_msg LRESULT On
不要是自己添加的LRESULT On
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: ‘static_cast‘ LRESULT LRESULT错误
- error C2440: 'static_cast' LRESULT LRESULT错误
- error C2440: “static_cast”: 无法从“void (__thiscall CXXDlg* )(void)”转换为“LRESULT (__thiscall CWnd:的错误
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmd
- error C2440: 'static_cast' : cannot convert from 'void (__thiscall MenuToolBar::* )(LPARAM,LRESULT *)' to 'void (__thiscall CCmd
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CchatDlg::* )(CPoint)' to 'UI
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__t
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- error C2440: “static_cast”: 无法从“UINT (__thiscall CXXX::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )
- error C2440: “static_cast”: 无法从“void (__thiscall CTransparentWnd::* )(WPARAM,LPARAM)”转换为“LRESULT (__
- error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CchatDlg::* )(CPoint)' to 'UI
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thisca
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- UVa 11388 - GCD LCM
- dedecms 与 discuz 对比,最新的看法
- jboss下部署配置spring jndi
- 什么是内网、公网、NAT?
- 如何用游戏化改变拖延?
- error C2440: ‘static_cast‘ LRESULT LRESULT错误
- 期末临考小记-1。
- Highcharts进阶应用
- 计算机网络基础——体系结构
- C#编程宝典(十年典藏版)(奋斗的小鸟)_PDF 电子书
- CSDN第五天上课
- linux常用命令
- 开源 免费 java CMS - FreeCMS-功能说明-角色管理
- C++命名空间