[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Files]
Source: "ReadMeRu.rtf"; DestDir: "{tmp}"; Flags: ignoreversion
[code]
var
InfoForm: TSetupForm;
Info, Ok: TButton;
InfoBefore: TRichEditViewer;
ReadmeRu,ReadmeEn: AnsiString;
procedure Okclick(Sender: TObject);
begin
InfoForm.Close;
WizardForm.Enabled:=True;
end;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
begin
WizardForm.Enabled:=true;
end;
procedure InfoClick(Sender: TObject);
begin
InfoForm:= CreateCustomForm();
with InfoForm do begin
ClientWidth := ScaleX(350);
ClientHeight := ScaleY(250);
CenterInsideControl(WizardForm, False);
Caption:='';
onClose:=@FormClose;
Ok:=tbutton.create(InfoForm)
with Ok do begin
SetBounds(ScaleX(290),ScaleY(210),ScaleX(50),ScaleY(30));
parent:=InfoForm;
Caption:='OK';
onclick:=@OKclick;
end;
InfoBefore:= TRichEditViewer.Create(InfoForm);
with InfoBefore do begin
SetBounds(ScaleX(10),ScaleY(10),ScaleX(330),ScaleY(180));
Parent:= InfoForm;
// ParentColor := True;
// Color:= WizardForm.Color;
// BorderStyle:= bsNone;
ScrollBars:= ssVertical;
ReadOnly:= true;
RTFText:= ReadmeRu
end;
InfoForm.Show;
WizardForm.Enabled:=false;
end;
end;
procedure InitializeWizard;
begin
ExtractTemporaryFile('ReadMeRu.rtf');
LoadStringFromFile(ExpandConstant('{tmp}')+'\ReadMeRu.rtf', ReadmeRu);
Info:=tbutton.create(WizardForm);
with Info do begin
Parent:=WizardForm;
SetBounds(ScaleX(20),ScaleY(325),ScaleX(45),ScaleY(30));
Caption:='x';
OnClick:=@InfoClick;
end;
end;