error C2440 “static_cast” 无法从“void (__thiscall C* )(void)...
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 C2440 “static_cast” 无法从“void (__thiscall C* )(void)...的更多相关文章
- error C2440: “static_cast”: 无法从“LRESULT (__thiscall CTextProgressCtrl::* )(UINT,LPCTSTR)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)
转自原文 error C2440 “static_cast” 无法从“void (__thiscall C* )(void)... error C2440: “static_cast”: 无法从“LR ...
- c语言-error C2440: “static_cast”: 无法从“UINT (__thiscall CHyperLink::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
出现这个错误的原因可是“人力不可抗拒”之原因造成的,因为旧版本的 ON_WM_NCHITTEST 宏使用了 UINT (__thiscall CWzButton::* )(CPoint); 类型的类成 ...
- 无法从“void (__thiscall CtestDlg::* )(void)”转换为“LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)”
按照孙鑫的教程添加自定义消息时,如果是VC6.0开发环境,也许没有什么 问题,但在VS2008中编译会报错的 无法从"void (__thiscall CtestDlg::* )(voi ...
- error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint) (转)
原文转自 http://blog.csdn.net/yinxing408033943/article/details/7601698 解决方法: 找到 UNIT CStaticLink::OnNcH ...
- static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCmdTarget::* )(NMHDR *,LRESULT
static_cast” : 无法从“void (__thiscall CMainFrame::* )(NMTOOLBARA *,LRESULT *)”转换为“void (__thiscall CCm ...
- OpenGL与vs编程——error C2440: “glMaterialfv”: 无法从“GLfloat”转换为“const GLfloat *”
void setMaterial(const GLfloat mat_diffuse[4],GLfloat mat_shininess){static const GLfloat mat_specul ...
- 孙鑫视频学习:改变窗口过程函数中出现error C2440错误的解决方法
在Visual Studio 2010中,即使代码是完完全全按照孙鑫视频中的敲,也会在出现error C2440,这是因为开发平台由VC6.0升级至VS2010,需要将原有的项目迁移.VS2010对消 ...
- error C2440
error C2440: "初始化": 无法从"std::_List_const_iterator<std::_List_val<std::_List_sim ...
- C++ error C2440: “类型转换” : 无法从“std::vector::iterator”转换为“
原文地址:http://blog.csdn.net/onlyou930/article/details/5602654 圆环套圆环之迭代器 话说这一日是风平浪静,万里乌云,俺的心情好的没得说,收到命令 ...
随机推荐
- windows 10 无法启动 windows update 服务 错误 0x80070005 拒绝访问
windows 10 无法启动 windows update 服务 错误 0x80070005 拒绝访问: 解决方法: 首先重命名系统盘 windows目录下的代号为“SoftwareDistribu ...
- spring整合Quartz框架过程,大家可以参考下
这篇文章详细介绍了spring集成quartz框架流程,通过示例代码进行了详细说明,对学习或任务有参考学习价值,并可供需要的朋友参考. 1.quartz框架简介(m.0831jl.com) quart ...
- vue+Iview+gulp 生成文档说明
1.安装npm gulp相关插件 比如:gulp.gulp-concat.gulp-htmlmin.gulp-cssmin.gulp-cheerio.gulp-clean 2. 编写gulpfile. ...
- BZOJ 1084 (SCOI 2005) 最大子矩阵
1084: [SCOI2005]最大子矩阵 Time Limit: 10 Sec Memory Limit: 162 MB Submit: 3560 Solved: 1779 [Submit][Sta ...
- re.groups取出来的空元祖??
源自学习笔记: day23_1_re_ groups方法取出来的字符是空的元组??为啥? ''' # ------------------------------------------------- ...
- namespace 命名空间
namespace作用:资源隔离 当我们不指定namespace时,默认放在default下 创建namespace kubectl create namespace 资源名称 在生产中,我们建议一个 ...
- <随便写>同步,异步进程池,线程
from multiprocessing import Pool import time import os def work(n): print("%s run" % os.ge ...
- 收藏的链接-Git
git远程删除分支后,本地git branch -a 依然能看到的解决办法. - qq_763034592的博客 - CSDN博客 https://blog.csdn.net/qq_16885135/ ...
- Java中9大内置基本数据类型Class实例和数组的Class实例
1.Java中9大内置几本数据类型: 对于对象来说,可以直接使用对象.getClass()或者Class.forName(className);.类名.class都可以获取Class实例. 但是我们的 ...
- 在页面上显示PDF
/// <summary> /// 读取PDF文件 /// </summary> /// <param name="fName">文件名称(可以 ...