As far as I know, there is no {cm:...}
like constant by which you could expand a [Messages]
entry. If I'm right, then it depends on where do you want to use such constant. If it's in the scripting part, then you'll need to use a scripted constant
with a getter calling the SetupMessage
function, by which you can expand those built-in messages for selected language by the constants listed in this file
.
As you can notice, every message constant has just the msg
prefix of the [Messages]
entry from the language file.
For instance, to expand the WizardPreparing
message into the Description
value for the [Run]
section entry you would expand the msgWizardPreparing
constant this way:
[Run]
Filename: "MyProg.exe"; Description: "{code:GetDescription}"
[Code]
function GetDescription(Value: string): string;
begin
Result := SetupMessage(msgWizardPreparing);
end;
In the [Code]
section is the situation naturally easier, since the SetupMessage
function you can use directly there. So, for instance, to show a message box with the expanded CannotContinue
message you'd expand the msgCannotContinue
constant simply this way:
[Code]
procedure InitializeWizard;
var
S: string;
begin
S := SetupMessage(msgCannotContinue);
MsgBox(S, mbInformation, MB_OK);
end;