我需要一种方法将自己的按钮添加到向导页面/删除Inno Setup中的现有按钮。那可能吗?
答案 0 :(得分:11)
是的,有可能:
[code]
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('This is a demo of how to create a button!', mbInformation, mb_Ok);
end;
procedure CreateAboutButton(ParentForm: TSetupForm; CancelButton: TNewButton);
var
AboutButton: TNewButton;
begin
AboutButton := TNewButton.Create(ParentForm);
AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top;
AboutButton.Width := CancelButton.Width;
AboutButton.Height := CancelButton.Height;
AboutButton.Caption := '&About...';
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := ParentForm;
end;
procedure InitializeWizard();
begin
CreateAboutButton(WizardForm, WizardForm.CancelButton);
end;
有关更多示例,请查看\ program files \ inno setup 5 \ examples中的CodeClasses.iss示例脚本。