TaskDialog更改按钮语言 [英] TaskDialog change button language

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

问题描述

我使用 Vista TaskDialog包装器和仿真器用于WindowsForms.

I use the Vista TaskDialog Wrapper and Emulator for WindowsForms.

它工作正常,但是如何更改按钮的语言?

It works fine, but how can I change the language of the buttons?

推荐答案

我有理由认为无法更改常用按钮的语言. (公用按钮以特殊方式处理,并且还会返回特殊结果,请参见 TASKDIALOGCONFIG结构.没有提供用于语言更改的选项.)

I have reasons to think change language of common buttons is NOT possible. (Common buttons are treated in special way and also return special results, please see TASKDIALOGCONFIG structure. There is no option provided for language change.)

因此,如果您要谈论的是通用按钮YesNoOKCancelRetryClose的语言更改,则其标签上的文本取自活动资源Windows UI语言.这与Windows刚开始使用MsgBox()对话框的按钮相同. (按钮为YesNoOKCancelAbortRetryIgnoreHelp.)我相信普通按钮的措词不能更改以保持程度.同一台计算机上所有基本对话框的一致性.

So if you are speaking about change of language of common buttons Yes, No, OK, Cancel, Retry, Close, then text on their labels is taken from resources of active Windows UI language. This is the same case as with buttons of MsgBox() dialog which was there from beginning of Windows. (Buttons are Yes, No, OK, Cancel, Abort, Retry, Ignore, Help.) I believe wording on common buttons was not made changeable to keep degree of uniformity in all basic dialog boxes on the same machine.

您的应用程序并非仅遇到此问题,大多数已经以其他语言安装过应用程序的用户只是接受此行为,并不将其视为错误.您始终可以解释这是使用Windows提供的模板制作的对话框的标准行为.您很清楚,标签 的更改不是唯一的,而是 TaskDialog 的许多 约束之一.

Your application is not alone with this issue and most users who already installed applications in different language simply accept this behavior and don't view it as a bug. You can always explain this is standard behavior for dialog boxes made using the template provided by Windows. You know very well that change of labels is not the only, but one of many constraints of TaskDialog.

解决方法是创建自定义按钮,尽管与此同时您也失去了创建链接的能力.如果您正在编写大型应用程序,则考虑为许多应用程序已经实现的这种类型的对话框编写自己的基础.

Workaround is to create custom buttons although along with this you are losing ability to create links. If you are writing large application, consider writing own foundation for this type of dialog boxes as many applications already implement, too.

这篇关于TaskDialog更改按钮语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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