procedure CancelButtonClick(CurPageID: Integer;var Cancel, Confirm: Boolean);
var
CloseLabel :TLabel;
begin
If CurPageID = wpInstalling then
begin
SuspendProc;
KillTimer(0,TimeTimerID);
SetTaskBarProgressState(0,TBPF_PAUSED);
ImgPBDelete(ProgressBar);
ProgressBar:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\pbbkgy.png'), ExpandConstant('{tmp}\pby.png'), 10, 220, WizardForm.ClientWidth-20, 25);
ImgPBSetPosition(ProgressBar,CurrProgress);
ImgApplyChanges(WizardForm.Handle);
end;
if (CurPageID<>99) and (CurPageID <> wpWelcome) then
begin
CloseForm:=CreateCustomForm;
with CloseForm do
begin
Width := 305;
Height := 120;
//BorderIcons := []; //(biSystemMenu, biMinimize, biMaximize, biHelp)
BorderStyle :=bsDialog //(bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin)
Color := clWindowFrame;
Position := poScreenCenter;
Caption :=GetWord('Exit');
end;
CloseForm.Font:=Font;
ExtractTemporaryFile('exit.ico');
SendMessage(CloseForm.Handle, $80, 0, LoadImage(0,ExpandConstant('{tmp}')+'\exit.ico',1,16,16,$1010));
CloseLabel:=TLabel.Create(CloseForm);
With CloseLabel do
begin
SetBounds(10,10,280,100);
AutoSize :=false;
Alignment :=taCenter;
Transparent :=true;
Parent :=CloseForm;
Font.Height :=-15;
Caption :=GetWord('ExitLbl');
end;
bCloseYes:=BtnCreate(CloseForm.Handle,20,50,100,40,'button.png',18,false);
BtnSetText(bCloseYes,GetWord('Yes'));
BtnSetFont(bCloseYes,Font.Handle);
BtnSetFontColor(bCloseYes,{#BtnFirstColor},{#BtnFirstColor},{#BtnSecondColor},{#BtnSecondColor});
BtnSetEvent(bCloseYes,BtnClickEventID,WrapBtnCallback(@ButtonsOnClick,1));
bCloseNo:=BtnCreate(CloseForm.Handle,180,50,100,40,'button.png',18,false);
BtnSetText(bCloseNo,GetWord('No'));
BtnSetFont(bCloseNo,Font.Handle);
BtnSetFontColor(bCloseNo,{#BtnFirstColor},{#BtnFirstColor},{#BtnSecondColor},{#BtnSecondColor});
BtnSetEvent(bCloseNo,BtnClickEventID,WrapBtnCallback(@ButtonsOnClick,1));
ImgApplyChanges(CloseForm.Handle);
CloseForm.ShowModal;
if CloseTemp then
begin
confirm:= false;
CancelButtonClick(99,Cancel,Confirm);
if CurPageID = wpInstalling then ISDoneCancel:=1;
end
else
begin
cancel:=false;
CancelButtonClick(99,Cancel,Confirm);
if CurPageID = wpInstalling then TimeTimerID:=SetTimer(0,0,1000,WrapTimerProc(@Timer,0));
end;
end;
if CurPageID = wpInstalling then
begin
ImgPBDelete(ProgressBar);
ProgressBar:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\pbbkgg.png'), ExpandConstant('{tmp}\pbg.png'), 10, 220, WizardForm.ClientWidth-20, 25);
ImgPBSetPosition(ProgressBar,CurrProgress);
ImgApplyChanges(WizardForm.Handle);
SetTaskBarProgressState(0,TBPF_NORMAL);
ResumeProc;
end;
if CurPageID = wpWelcome then begin
Cancel:=excancel;
Confirm:=exconfirm;
CancelButtonClick(99,Cancel,Confirm);
end;