I need a way to add my own buttons to wizard pages/remove existing ones in Inno Setup. Is that possible?
Yes, it is possible:
[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;
For more examples, take a look at the CodeClasses.iss example script in \program files\inno setup 5\examples.