[Setup]
AppName=My Application
AppVersion=1.5
CreateAppDir=no
OutputDir=.
[Files]
Source: "Pic\0.bmp"; Flags: dontcopy
Source: "Pic\1.bmp"; Flags: dontcopy
Source: "Pic\2.bmp"; Flags: dontcopy
[CustomMessages]
Text0=Текст 0
Text1=Текст 1
Text2=Текст 2
Text3=Текст 3
Text4=Текст 4
Text5=Текст 5
Text6=Текст 6
Text7=Текст 7
Text8=Текст 8
Text9=Текст 9
[Code]
var
MyCheckBox: array of TNewCheckBox;
MyLabel: TLabel;
Image: TBitmapImage;
procedure ShowPic(ImgTag: longint);
begin
if not FileExists(IntToStr(ImgTag)+'.bmp') then ExtractTemporaryFile(IntToStr(ImgTag)+'.bmp');
Image.Bitmap.LoadFromFile(ExpandConstant('{tmp}\')+IntToStr(ImgTag)+'.bmp');
end;
procedure CheckBoxEvent(Sender: TObject);
begin
Image.Show;
MyLabel.Caption:=CustomMessage('Text'+IntToStr(TNewCheckBox(Sender).Tag));
ShowPic(TNewCheckBox(Sender).Tag);
end;
procedure CheckBoxEventLeave(Sender: TObject);
begin
Image.Hide;
end;
procedure CreateMyCheckBox(Parent: TWinControl; Left, Top, Wigth, Height: Integer; Caption: String);
var
count: Integer;
begin
count:=GetArrayLength(MyCheckBox);
SetArrayLength(MyCheckBox, count+1);
MyCheckBox[count]:=TNewCheckBox.Create(Parent);
MyCheckBox[count].Caption:=Caption;
MyCheckBox[count].SetBounds(Left, Top, Wigth, Height);
MyCheckBox[count].OnMouseEnter:=@CheckBoxEvent;
MyCheckBox[count].OnMouseLeave:=@CheckBoxEventLeave;
MyCheckBox[count].Parent:=Parent;
MyCheckBox[count].Tag:=count;
end;
procedure InitializeWizard;
var
i: Integer;
begin
Image := TBitmapImage.Create(WizardForm);
Image.Parent := WizardForm;
Image.SetBounds(ScaleX(200), ScaleY(80), ScaleX(200), ScaleY(125));
with WizardForm do begin
Bevel.Hide;
OuterNotebook.Hide;
NextButton.Width:=ScaleX(0);
//
for i:=0 to 2 do CreateMyCheckBox(WizardForm, ScaleX(30), ScaleY(30+21*i), ScaleX(80), ScaleY(20), 'CheckBox '+IntToStr(i));
//
MyLabel:=TLabel.Create(WizardForm);
MyLabel.AutoSize:=False;
MyLabel.WordWrap:=False;
MyLabel.Alignment:=taCenter;
MyLabel.Layout:=tlCenter;
MyLabel.Color:=clGray;
MyLabel.Transparent:=False;
MyLabel.SetBounds(ScaleX(30), ScaleY(300), ScaleX(120), ScaleY(20));
MyLabel.Parent:=WizardForm;
end;
end;