没有合适的资源?快使用搜索试试~ 我知道了~
MessageBox按钮显示英语或者其他语言
2星 需积分: 50 76 下载量 29 浏览量
2017-10-27
23:00:55
上传
评论
收藏 20KB DOCX 举报
温馨提示
试读
2页
windows开发使用到的MessageBox显示英文或者其他语言方法。
资源推荐
资源详情
资源评论
MessageBox 按钮显示英文或其他语言
由于特殊原因我们需要将 MessageBox 或 Dialog 的按钮“确定”、“取消”用英
文或其他语言显示。在网上查找了很多相关内容,但很多要么很麻烦,要么根
本就不能实现所需效果。最后发现还是 MSDN 最好用。
首先是 MessageBox 中如何将按钮中的文字显示为其他语言。MessageBox
要使用 MessageBoxEx 才可以,其定义如下:
int WINAPI MessageBoxEx(
_In_opt_ HWND hWnd,
_In_opt_ LPCTSTR lpText,
_In_opt_ LPCTSTR lpCaption,
_In_ UINT uType,
_In_ WORD wLanguageId
);
1
2
3
4
5
6
7
最后一个参数 MSDN 上给出的解释是:
wLanguageId [in]
Type: WORD
The language for the text displayed in the message box button(s).
Specifying a value of zero (0) indicates to display the button text in
the default system language. If this parameter is
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), the current
language associated with the calling thread is used.
To specify a language other than the current language, use the
MAKELANGID macro to create this parameter. For more information,
see MAKELANGID.
意思就是我们需要用函数 MAKELANGID(LANG_NEUTRAL,
SUBLANG_NEUTRAL),来生成最后一个参数。它的定义为
WORD MAKELANGID(
资源评论
- zfcguangshan2019-06-22内容抄网上的啊
- 信仰纯白的你2019-08-07我靠,东西不行啊,不值得
- luckyjie8882019-12-26一般般吧 能用
- 二十四夜2018-11-26内容质量一般般 ~~~
danxuezx
- 粉丝: 273
- 资源: 82
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功