Change Inno Setup message boxes button captions

I want to know how how to change other window caption's name in Inno Setup, when the message box appears "File not exist", "File exist", "After installation is cancelled" and "installation cancel".

enter image description here

[Code]

// This is code how to display a message after installation is cancelled

var
  LastStep: TSetupStep;
procedure CurStepChanged(CurStep: TSetupStep);
begin
  Log(Format('Step: %d', [CurStep]));
  LastStep := CurStep;
end;
procedure DeinitializeSetup();
begin
  { Installation started, but never finished => It must have been cancelled. } 
  if LastStep = ssInstall then
  begin
    MsgBox('Տեղադրումը չեղարկվեց:', mbInformation, MB_OK);
  end;
end;

Upvotes: 1

Views: 115

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202584

You cannot change button captions of the standard message boxes.

Those message boxes are implemented using MessageBox WinAPI function, which uses button captions according to system locale.

If it is your custom message box, you can of course implement it from the scratch – starting with CreateCustomForm. One of many examples, you can find here: Create custom message box (yes / no) in Inno Setup.

Of course, you can code some monitoring code that will pickup any new windows and modify them as they appear. But that's lot of risky unreliable code. Though for simple message boxes it might do.

Upvotes: 1

Related Questions