Vitalliano Diawer Прочтите шапку и, пожалуйста, подкорректируйте свои посты.
Добавлено: Diawer Цитата: Что, никто с ходу не может решить задачу
Я гляжу, ты с ходу можешь.
До [more=такого]
[Код]
type
TProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
var
TimerID: LongWord;
SlideImage: TBitmapImage;
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 PercentProgress(): Integer;
begin
with WizardForm.ProgressGauge do
Result := (Position-Min) / ((Max - Min) / 100);
end;
procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
if (PercentProgress > 30) and (PercentProgress < 50) and (SlideImage.Tag <> 1) then
begin
SlideImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_2.bmp'));
SlideImage.Tag := 1;
end
else
if (PercentProgress > 50) and (PercentProgress < 80) and (SlideImage.Tag <> 2) then
begin
SlideImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_3.bmp'));
SlideImage.Tag := 2;
end;
end;
procedure CurPageChanged(CurPageID: Integer);
var
pfunc: LongWord;
begin
if CurPageID = wpInstalling then
begin
pfunc := WrapTimerProc(@OnTimer, 4);
TimerID := SetTimer(0, 0, 100, pfunc);
SlideImage := TBitmapImage.Create(WizardForm);
SlideImage.Left := WizardForm.ProgressGauge.Left;
SlideImage.Top := WizardForm.ProgressGauge.Top + WizardForm.ProgressGauge.Height + 10;
SlideImage.Width := ScaleX(400);
SlideImage.Height := ScaleY(150);
SlideImage.Stretch := True;
SlideImage.Bitmap.LoadFromFile(ExpandConstant('{src}\Image_1.bmp'));
SlideImage.Parent := WizardForm.InstallingPage;
end;
end;
procedure DeinitializeSetup();
begin
KillTimer(0, TimerID);
end;
[/more], конечно, сложно догадаться.