有没有一种方法可以更改MessageBox按钮上的文本? [英] Is there a way to change text on MessageBox buttons?

查看:106
本文介绍了有没有一种方法可以更改MessageBox按钮上的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的问题很简单,我想将消息框按钮上的文本更改为其他内容

例如,我要使是"按钮说确定"

我可以这样做吗?

我前一段时间在Google上进行过搜索,我记得我找不到任何有用的信息,因此,如果有人给我一个Google搜索结果,那将是令人尴尬的:-)


在此先感谢
:-)

Hello guys,

My question is really simple I want to change the text on messagebox buttons to something else

for example I want to make ''yes'' button say ''sure''

can I do this ?

I did google this some while ago and I remember I couldnt find anything helpful so if somebody get me a google result it will be Embarrassing :-)


thanks in advance
:-)

推荐答案

这确实是可能的.
为此,在CodeProject上有一个现成的类.
只需使用CodeProject搜索功能!
祝你好运!

如果您真的找不到它...请在这里尝试:将系统MessageBox本地化 [ ^ ]
It is indeed possible.
There is a ready made class for this, here on CodeProject.
Just use the CodeProject Search feature!
Good luck!

If you really can''t find it... try here: Localizing System MessageBox[^]


我相信调用Win32 API只是实现此目标的一种方法.如果我没记错的话,可以通过使用SendMessage API函数来完成.但是它需要知道用于字幕更改的窗口"(按钮)的句柄.
I believe calling Win32 API is only one way how to achieve this. If I remember correctly this could be done by using SendMessage API function. But it needs to know handle of the "window"(button) intended for caption change.


这篇关于有没有一种方法可以更改MessageBox按钮上的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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