Skip to content
Browse files

Issue #805: fall back to translated button captions if GetLocaleStrin…

…g returned an empty string. Setting an empty button caption raises an exception in TTaskDialogButtonItem
  • Loading branch information
ansgarbecker committed Nov 14, 2019
1 parent 17f6cb8 commit 6695a31eaed81db234c4b6496c10942e2cdf3072
Showing with 4 additions and 1 deletion.
  1. +4 −1 source/apphelpers.pas
@@ -2367,10 +2367,13 @@ function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons:
cap: String;
Btn := TTaskDialogButtonItem(Dialog.Buttons.Add);
cap := '';
if ResourceId > 0 then begin
// Prefer string from user32.dll
// May be empty on Wine!
cap := GetLocaleString(ResourceId)
end else begin
if cap.IsEmpty then begin
cap := _(BtnCaption);
for i:=1 to Length(cap) do begin
// Auto apply hotkey

0 comments on commit 6695a31

Please sign in to comment.
You can’t perform that action at this time.