创新设置:在消息框上使用自己的按钮文本 [英] Inno-Setup: use own button texts on messagebox
问题描述
在良好的GUI设计中,通常的做法是不使用Yes-No-messageagebox,而是给按钮提供真实姓名,例如保存或放弃.至少对于我们在代码部分中显示的消息框,我们如何在InnoSetup中用MsgBox
显示的消息框中实现此目标?
It is common practice in good GUI design to not use Yes-No-messageboxes but give the buttons real names, e.g. Save or Discard. How we can achieve this in messageboxes displayed with MsgBox
in InnoSetup, at least for the ones we show in the code section?
推荐答案
MsgBox
函数在内部使用像这样 ).因此,要获得自定义按钮文本,您将需要使用此类钩子并在显示对话框,显示对话框之前更改文本,然后再将其更改回普通文本(因为Inno Setup也使用此对话框).
The MsgBox
function uses internally the MessageBox
Windows API function which allows you to use only a specific set of predefined buttons or button groups. What's worse, the buttons cannot be easily localized (without a hook like this). So, to have custom button texts you would need to use such hook and change the texts before showing your dialog, show the dialog and after that change them back to the common texts (because Inno Setup uses this dialog too).
另一个更简单的选择是制作自定义表格.
Another, easier option would be making custom form.
这篇关于创新设置:在消息框上使用自己的按钮文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!