为什么我的简单的C ++ GUI应用程序显示中文的消息框? [英] Why does my simple C++ GUI application show a message box in Chinese?

查看:100
本文介绍了为什么我的简单的C ++ GUI应用程序显示中文的消息框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


<>


推荐答案

放置一个字符串,使其成为一个宽字符串。 L再见残酷的世界

Put an L infront of your string to make it a wide string. L"Goodbye cruel World"

然后你不需要演员。

TEXT()宏,它将根据您的配置设置创建一个unicode字符串或ascii字符串。

You can also use the TEXT("") macro that will create an unicode string or ascii string depending on your configuration settings.

您看到中文的原因是MessageBox正在解释ascii字符串作为unicode。

The reason you were seeing chinese is that MessageBox was interpreting an ascii string as unicode.

这篇关于为什么我的简单的C ++ GUI应用程序显示中文的消息框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆