error C2660: 'MessageBoxA' : function does not take 4 parameters
解决办法,使用域操作符::MessageBox(),则使用API的4个参数形式
::MessageBox(NULL,"","",MB_OK);
将MessageBox( NULL, (LPCTSTR)lpMsgBuf, “Error”, MB_OK | MB_ICONINFORMATION );
改为:
::MessageBox( NULL, (LPCTSTR)lpMsgBuf, “Error”, MB_OK | MB_ICONINFORMATION );
MessageBox是API,因此它需要HWND参数指定其所属窗体。AfxMessageBox()mfc中的全局函数,无句柄HWND参数。能用MessageBox()的地方都能用AfxMessageBox(),但AfxMessageBox不能设置消息框标题(它的默认标题就是应用程序的可执行文件名).
::MessageBox() 是CWnd的成员函数,它要求MessageBox只能在cwnd类及其子类中使用;它不要求HWND参数,因为CWnd已经指明了其所属窗口。 因此CWnd::MessageBox()和::MessageBox(HWND)作用等同。
error C2660: 'MessageBoxA' : function does not take 4 parameters相关推荐
- VC GDI+: error C2660: 'new' : function does not take 3 parameters
今天在用GDI+写程序时,有 bmp = new Bitmap(L"E:\\1.png"); 用VC6 SP6或VS2005编译错误为error C2660: 'new' : fu ...
- 求助!!VC++6.0出现error c2660
求助大神们!!! 我写了一个函数,携带一个 自定义的结构体指针 参数. 在调用的时候也是只携带了一个同类型的指针参数,但是就出现这种情况: error C2660: 'CSC' : function ...
- C语言 error C4996: This function or variable may be unsafe - C语言零基础入门教程
目录 一.error C4996 简介 二.error C4996 解决办法 1.采用_s 结尾的安全版本 2.去掉 visual studio "安全开发生命周期(SDL)检查" ...
- QT编程错误解决——error: no matching function for call to
实现信号与槽函数绑定机制中出现如下错误: error: no matching function for call to 'Widget::connect(QPushButton*&, voi ...
- Qt5:error: no matching function for call to 'MainWindow::connect()
报错代码: connect(ui->chartComboBox,&QComboBox::currentIndexChanged,this,&MainWindow::getChar ...
- minpack.error: Result from function call is not a proper array of floats.
minpack.error: Result from function call is not a proper array of floats. 参考资料: [1] https://blog.csd ...
- error: no matching function for call QDebug:: QDebug
error: no matching function for call QDebug:: QDebug 源代码 #include "mypushbutton.h" #includ ...
- imgproc/src/morph.simd.hpp:756: error:(-213:The function/feature is not implemented)解决方案
imgproc/src/morph.simd.hpp:756: error:(-213:The function/feature is not implemented)解决方案 问题描述 在使用下面代 ...
- keil5提示main.c: error C237: ‘wd‘: function already has a body
keil5提示错误:main.c: error C237: 'wd': function already has a body 原因:函数重定义 在其他地方有相同的名字出现,但其所表达含义不同! 修改 ...
最新文章
- Zend Studio添加ThinkPHP代码提示方法
- 几点易被忽视的网络软故障排查
- 【SeeMusic】购买付费版本 ( 进入购买页面 | 购买流程 )
- 枚举项的数量限制在64个以内
- 打败 Python、JS、C# 成最受欢迎编程语言,是时候掌握 Rust 了吗?
- 防火墙双机热备配置实例(二)
- doc.project java_GitHub - kanghaimeng/idoc: Generate doc for java maven project.(java 项目自动生成文档)...
- 雷林鹏分享:Redis 简介
- 新建Office文件丨默认模板文件
- TimesTen 介绍
- 计算机趣味知识竞赛策划,大学生趣味知识竞赛活动的策划书
- X79寨板远程启动计算机,X79旗舰主板评测
- 双目测距理论及其python实现
- Java 操作 Office:POI之word图片处理
- JavaWeb之Servlet技术完全版
- 用scratch2.0编写乒乓球游戏
- win10 添加打印机
- 将图像绘制成3维立体散点图
- Caused by: java.lang.IllegalStateException: Failed to introspect Class
- 图灵的文章“Computing machinery and intelligence”译文