Chanka Цитата: Можно ли когда устанавливается DirectX чтобы под надписью DirectX была надпись Идёт установка DirectX. Ждите...
[more=Код]
Код: [CustomMessages]
Text1=Vampire: The Masquerade Bloodlines requires Microsoft DriectX 9.0c drivers to run properly. These drivers may not be compatible 'with some video cards and certain display modes.
Text2=DirectX 9.0c will be installed over any previous versions of Dir'ectX, after which you may be instructed to restart your computer'.
YesRadio=Yes, I want to install DirectX now.
NoRadio=No, I do not want to install DirectX at this time.
Text3=Do you want to install DirectX 9.0c?
Text4=Installing DirectX...
[Code]
var
Bevel: TBevel;
Text1,Text2,Text3,Text4: TNewStaticText;
RadioButton1,RadioButton2: TRadioButton;
function Form_NextButtonClick(Page: TWizardPage): Boolean;
var ResultCode: Integer;
begin
Result:=True
if RadioButton1.Checked then
begin
Text4.Visible:=True
Exec(ExpandConstant('{src}\DirectX\DXSETUP.EXE'), '/silent', '', SW_SHOW,
ewWaitUntilTerminated, ResultCode)
Text4.Visible:=False
end
if RadioButton2.Checked then
begin
if MsgBox('If you do not have DirectX 9.0c or highter, the game will not run properly.'#13+
+'Are you sure you do not want to install DirectX 9.0c at this time?', mbConfirmation,MB_YESNO)=IDNO then
Result:=False
end
end;
function DirectxPage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
begin
Page := CreateCustomPage(PreviousPageId,'DirectX','');
Bevel := TBevel.Create(Page);
with Bevel do
begin
Parent := Page.Surface;
Left := ScaleX(8);
Top := ScaleY(136);
Width := ScaleX(385);
Height := ScaleY(73);
Shape := bsFrame;
end;
Text1 := TNewStaticText.Create(Page);
with Text1 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:Text1}');
Left := ScaleX(8);
Top := ScaleY(8);
Width := ScaleX(389);
Height := ScaleY(38);
AutoSize := False;
TabOrder := 0;
WordWrap := True;
end;
Text2 := TNewStaticText.Create(Page);
with Text2 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:Text2}');
Left := ScaleX(8);
Top := ScaleY(64);
Width := ScaleX(389);
Height := ScaleY(30);
AutoSize := False;
TabOrder := 1;
WordWrap := True;
end;
RadioButton1 := TRadioButton.Create(Page);
with RadioButton1 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:YesRadio}');
Left := ScaleX(24);
Top := ScaleY(152);
Width := ScaleX(345);
Height := ScaleY(17);
TabOrder := 2;
Checked := True;
end;
RadioButton2 := TRadioButton.Create(Page);
with RadioButton2 do
begin
Parent := Page.Surface;
Caption := ExpandConstant('{cm:NoRadio}');
Left := ScaleX(24);
Top := ScaleY(176);
Width := ScaleX(337);
Height := ScaleY(17);
TabOrder := 3;
end;
Text3 := TNewStaticText.Create(Page);
with Text3 do
begin
Parent := Page.Surface;
Caption :=
ExpandConstant('{cm:Text3}');
Left := ScaleX(8);
Top := ScaleY(104);
Width := ScaleX(381);
Height := ScaleY(14);
AutoSize := False;
TabOrder := 4;
WordWrap := True;
end;
Text4 := TNewStaticText.Create(Page);
with Text4 do
begin
Parent:=Page.Surface;
Caption:=ExpandConstant('{cm:Text4}')
Left:=8
Top:=220
AutoSize:=True
TabOrder:=5
Visible:=False
end
with Page do
begin
OnNextButtonClick := @Form_NextButtonClick;
end;
Result := Page.ID;
end;
procedure InitializeWizard();
begin
DirectxPage(wpLicense);
end;