[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
DisableWelcomePage=yes
OutputDir=.
[code]
var
PageNameLabel, PageDescriptionLabel: TLabel;
function IsThemeActive: BOOL; external 'IsThemeActive@UxTheme.dll stdcall delayload';
function SetTransp: boolean;
begin
if WizardForm.WizardSmallBitmapImage.Width > 55 then
result := true else result := IsThemeActive;
end;
procedure InitializeWizard();
begin
with WizardForm.WizardSmallBitmapImage do
begin
SetBounds(ScaleX(0), ScaleY(0), ScaleX(497), ScaleY(60));
end;
PageNameLabel:=TLabel.Create(WizardForm);
with PageNameLabel do begin
AutoSize := False;
SetBounds(ScaleX(10), ScaleY(4), ScaleX(258), ScaleY(30));
Transparent := SetTransp;
Font.Name := 'Tahoma';
Font.Size := 8;
Font.Color := clGreen;
Font.Style := [fsBold];
Parent := WizardForm.MainPanel;
end;
PageDescriptionLabel:=TLabel.Create(WizardForm);
with PageDescriptionLabel do begin
AutoSize := False;
SetBounds(ScaleX(15), ScaleY(20), ScaleX(200), ScaleY(50));
Wordwrap := True;
Transparent := SetTransp;
Font.Name := 'Tahoma';
Font.Size := 8;
Font.Color := clGreen;
Parent := WizardForm.MainPanel;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
case CurPageID of
wpReady:
begin
PageDescriptionLabel.Caption:='Моя программа';
PageNameLabel.Caption:='Выбор папки установки';
end;
wpSelectDir:
begin
PageNameLabel.Caption:='Выбор типа и компонентов установки';
PageDescriptionLabel.Caption:='';
end;
end;
end;