error C2440: “static_cast”: 无法从“void (__thiscall CVCadView::* )(int)”转换为“void (__thiscall CCmdTarget
来源:互联网 发布:二维码 调用数据库 编辑:程序博客网 时间:2024/04/28 16:35
项目从vc6.0升级到用vs2013编译,遇到了一些问题
1."fabs": 对重载函数的调用不明确
2.error C2593: “+=”不明确
3.for循环int i的声明要放到外边
4.如题
要解决这个问题其实很简单,开始百度了一下,解决方案大都是:
{
1、VC6中,说可以把函数在头文件中定义为:
afx_msg void OnProgress()这样 但是在VS2005及以上,要求很严格,必须函数返回值为LRESULT类型,所以在VS2005及以上,需要修改为
LRESULT afx_msg OnProgress(WPARAM, LPARAM);
其中,后面两个参数不管用不用得上,都要写。
2、添加消息映射没差别
3、自己写的函数原型如下:
LRESULT CMainFrame::OnProgress(WPARAM wParam,LPARAM lParam) { return TRUE; //注意要返回一个TRUE! }
}
但是试了一下,无法解决我的问题,重新分析error本身,error C2440: “static_cast”: 无法从“void (__thiscall CVCadView::* )(int)”转换为“void (__thiscall CCmdTarget::*)(UINT)
于是把响应函数参数从int改为UINT,问题解决,解决方案往往在问题本身之中,不要舍近求远
0 0
- error C2440: “static_cast”: 无法从“void (__thiscall CVCadView::* )(int)”转换为“void (__thiscall CCmdTarget
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARA
- error C2440: “static_cast”: 无法从“void (__thiscall CXXDlg* )(void)”转换为“LRESULT (__thiscall CWnd:的错误
- error C2440: “static_cast”: 无法从“void (__thiscall CMyDlg::* )(WPARAM,LPARAM)”转换为“LRESULT (__thiscall
- static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT
- static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__t
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thisca
- error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thisca
- error C2440: “static_cast” : 无法从“void (__thiscall CMainFrame::* ) (NMTOOLBARA *,LRESULT *)”转换为“void
- vs2008 error C2440: “static_cast”: 无法从“void (__thiscall CMainFrame::* )(void)”转换为“LRESULT (__thiscal
- 【转】error C2440 “static_cast” 无法从“void (__thiscall CPppView )(void)”转换为“LRESULT (__thiscall CWnd )(WPARAM,LPARAM)”
- GrabCut in One Cut(基于图割算法grabcut的一次快速图像分割的OpenCV实现)----目前效果最好的图割
- 阻止资深程序员技术进步的最大敌人就是开始做管理,做管理至少毁了中国90%的好程序员。
- 杭电ACM1003
- Struts教程(一):搭建Struts环境,初步使用Struts
- 【Python】Mysql数据库操作类
- error C2440: “static_cast”: 无法从“void (__thiscall CVCadView::* )(int)”转换为“void (__thiscall CCmdTarget
- NP完全问题
- 小刚之问引发的思索
- 获得每日,每周,每月的0点和24点的时间戳
- [BZOJ1787][Ahoi2008]Meet 紧急集合&&[BZOJ1832][AHOI2008]聚会
- 1008. Elevator (20)
- 源码解析EventBus
- iOS开发49-iOS Mac OS X Openfire的安装与卸载
- Maven2插件surefire配置心得