[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Files]
Source: Files\CallbackCtrl.dll; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system;
[Code_]
var
Button: TButton;
DesktopLabel: TLabel;
type
TTimerProc = procedure (h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall';
function WrapTimerProc(callback:TTimerProc; paramcount:integer):LongWord; external 'wrapcallbackaddr@{tmp}\CallbackCtrl.dll stdcall delayload';
procedure MyOnTimer(h: Longword; msg: Longword; idevent: Longword; dwTime: Longword);
begin
DesktopLabel.Show;
KillTimer(WizardForm.Handle,1);
end;
procedure BackCompBtnClick(Sender: TObject);
begin
SetTimer(WizardForm.Handle,1,5000,WrapTimerProc(@MyOnTimer,4));
end;
function InitializeSetup(): Boolean;
begin
if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll')) then ExtractTemporaryFile('CallbackCtrl.dll');
Result:= True;
end;
procedure InitializeWizard();
begin
WizardForm.OuterNotebook.Hide;
DesktopLabel := TLabel.Create(WizardForm);
with DesktopLabel do
begin
Parent := WizardForm;
Caption := 'Че-то там...';
SetBounds(ScaleX(70), ScaleY(270), ScaleX(363), ScaleY(14));
Transparent := True;
Hide;
end;
Button:= TButton.Create(WizardForm);
with Button do
begin
Parent:= WizardForm;
SetBounds(ScaleX(70), WizardForm.BackButton.Top, WizardForm.BackButton.Width, WizardForm.BackButton.Height);
OnClick:= @BackCompBtnClick;
Caption:= 'Show';
end;
end;