Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Пользователь


Сообщения: 66
Благодарности: 29

Профиль | Отправить PM | Цитировать


Drongo, если я правильно понял, то тебе нужно слайдшоу по процентам установки.
Вот пример с тремя картинками. Думаю, будет понятно, как поставить 25 картинок.
Пример
[Setup]
AppName=My Program
AppVerName=My Program
CreateAppDir=No
WindowVisible=Yes

[Files]
Source: innocallback.dll; DestDir: {tmp}; Flags: dontcopy
Source: pic1.bmp; DestDir: {tmp}; Flags: dontcopy
Source: pic2.bmp; DestDir: {tmp}; Flags: dontcopy
Source: pic3.bmp; DestDir: {tmp}; Flags: dontcopy

[code]
type
TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
BackgroundBitmapImage: TBitmapImage;
TimerID: LongWord;

function WrapTimerProc(callback:TProc; paramcount:integer):longword;
external 'wrapcallback@files:innocallback.dll stdcall';
function SetTimer(hWnd: LongWord; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord;
external 'SetTimer@user32.dll stdcall';
function KillTimer(hWnd: LongWord; nIDEvent: LongWord): LongWord;
external 'KillTimer@user32.dll stdcall';
function GetSystemMetrics(nIndex:Integer):Integer;
external 'GetSystemMetrics@user32.dll stdcall';

procedure InitializeWizard();
begin
ExtractTemporaryFile('pic1.bmp')
ExtractTemporaryFile('pic2.bmp')
ExtractTemporaryFile('pic3.bmp')
end;

function PercentProgress(): Integer;
begin
with WizardForm.ProgressGauge do begin
Result:=(Position-Min)/((Max - Min)/100)
end
end;

procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
var
percent: integer;
begin
percent:=PercentProgress
with BackgroundBitmapImage do begin
if ((percent>0) and (percent<33) and (Tag<>1)) then begin
Bitmap.LoadFromFile(ExpandConstant('{tmp}') + '\pic1.bmp')
Tag:=1
end else
if ((percent>34) and (percent<66) and (Tag<>2)) then begin
Bitmap.LoadFromFile(ExpandConstant('{tmp}') + '\pic2.bmp')
Tag:=2
end else
if ((percent>67) and (percent<100) and (Tag<>3)) then begin
Bitmap.LoadFromFile(ExpandConstant('{tmp}') + '\pic3.bmp')
Tag:=3
end
end
end;

procedure CurPageChanged(CurPageID: Integer);
var
pfunc: LongWord;
Width, Height: Integer;
begin
If CurPageID=wpInstalling
then
begin
pfunc:=WrapTimerProc(@OnTimer, 4)
TimerID:=SetTimer(0, 0, 500, pfunc)
BackgroundBitmapImage:=TBitmapImage.Create(MainForm)
with BackgroundBitmapImage do begin
BackColor:=clBlack
Center:=True
Align:=alClient
Bitmap.LoadFromFile(ExpandConstant('{tmp}') + '\pic1.bmp')
Parent:=MainForm
Tag:=1
end
end
if CurPageID=wpFinished
then
begin
BackgroundBitmapImage.Hide
end
end;

procedure DeinitializeSetup();
begin
KillTimer(0, TimerID)
end;
Это сообщение посчитали полезным следующие участники:

Отправлено: 22:12, 01-05-2009 | #656