Inno-Setup: use own button texts on messagebox

江枫思渺然 提交于 2020-04-10 04:32:13

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/32097845/inno-setup-use-own-button-texts-on-messagebox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!