#define WIN32_LEAN_AND_MEAN#include <windows.h>
#include <windowsx.h>int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdline,
int nCmdshow)
{
MessageBox(NULL,"There is only you!","My first program!",MB_OK|MB_ICONEXCLAMATION);
return 0;
}>------ 已启动生成: 项目: helloM, 配置: Debug Win32 ------
1>正在编译...
1>HelloM.cpp
1>e:\visual studio 2008\projects\hellom\hellom\hellom.cpp(11) : error C2664: “MessageBoxW”: 不能将参数 2 从“const char [19]”转换为“LPCWSTR”
1> 与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
1>生成日志保存在“file://e:\Visual Studio 2008\Projects\helloM\helloM\Debug\BuildLog.htm”
1>helloM - 1 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========为什么是调用:MessageBoxW 呢??
#include <windowsx.h>int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdline,
int nCmdshow)
{
MessageBox(NULL,"There is only you!","My first program!",MB_OK|MB_ICONEXCLAMATION);
return 0;
}>------ 已启动生成: 项目: helloM, 配置: Debug Win32 ------
1>正在编译...
1>HelloM.cpp
1>e:\visual studio 2008\projects\hellom\hellom\hellom.cpp(11) : error C2664: “MessageBoxW”: 不能将参数 2 从“const char [19]”转换为“LPCWSTR”
1> 与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
1>生成日志保存在“file://e:\Visual Studio 2008\Projects\helloM\helloM\Debug\BuildLog.htm”
1>helloM - 1 个错误,0 个警告
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========为什么是调用:MessageBoxW 呢??
解决方案 »
- 关于给按钮上添加“PNG“图片的问题!!!求解决!!!
- CToolTipCtrl 显示位置问题!100分!
- 救!!!!!dll导出的类里有纯虚函数,该怎么办?????
- MFC程序如何与jsp网页通信?
- GetClientRect和GetWindowRect有什么区别?
- vc 6 写的com,用本地C#写的程序可以顺利调用,但是通过webservice就不能调用,请教这是什么原因
- modifystyle到底怎么用?
- 一个简单,但又常被人忽略的问题(::SendMessage()在哪里?)
- VC中嵌入汇编的问题?
- duilib 做出 豌豆荚的界面
- [向ALL提问]我头次开押宝坐庄,希望大家支持下(进来有分)
- MFC中如何提取的文本文件的信息
MessageBox(NULL, _T("There is only you!"), _T("My first program!"), MB_OK|MB_ICONEXCLAMATION);