欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 6965|回复: 1
收起左侧

[编程] “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型

[复制链接]
知行 发表于 2013-4-5 00:11 | 显示全部楼层 |阅读模式
vs一些报错:
d:\visual studio 2010\projects\chat_client\chat_client\chat_clientdlg.cpp(174): error C2665: “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型
1>          d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin.h(6699): 可能是“int AfxMessageBox(LPCTSTR,UINT,UINT)”
1>          d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin.h(6701): 或       “int AfxMessageBox(UINT,UINT,UINT)”
1>          尝试匹配参数列表“(const char [17])”时
1>d:\visual studio 2010\projects\chat_client\chat_client\chat_clientdlg.cpp(181): error C2665: “AfxMessageBox”: 2 个重载中没有一个可以转换所有参数类型
1>          d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin.h(6699): 可能是“int AfxMessageBox(LPCTSTR,UINT,UINT)”
1>          d:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxwin.h(6701): 或       “int AfxMessageBox(UINT,UINT,UINT)”
1>          尝试匹配参数列表“(const char [9])”时
1>d:\visual studio 2010\projects\chat_client\chat_client\chat_clientdlg.cpp(190): error C2065: “m_msg,”: 未声明的标识符
1>d:\visual studio 2010\projects\chat_client\chat_client\chat_clientdlg.cpp(190): error C2143: 语法错误 : 缺少“)”(在“常量”的前面)
1>d:\visual studio 2010\projects\chat_client\chat_client\chat_clientdlg.cpp(190): error C2059: 语法错误:“)”
 楼主| 知行 发表于 2013-4-5 00:13 | 显示全部楼层
#3楼 回复于:2007-01-01 09:20:39
AfxMessageBox(_T( "Simple   message   box. "));

#4楼 回复于:2007-01-01 10:15:58
记住一点,VC2005中默认的工程选项是UNICODE就可以了。
所以,加上_T或L是需要的。

与这个错误http://www.tecbbs.com/thread-4037-1-1.html 类似
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-5-3 19:32 , Processed in 0.064346 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表