2
我需要一種方法將我自己的按鈕添加到嚮導頁面/刪除Inno Setup中的現有按鈕。那可能嗎?Inno Setup - 替換默認的next/back/cancel按鈕
我需要一種方法將我自己的按鈕添加到嚮導頁面/刪除Inno Setup中的現有按鈕。那可能嗎?Inno Setup - 替換默認的next/back/cancel按鈕
是的,這是可能的:
[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;
更多的例子,看看在CodeClasses.iss示例腳本在\ Program Files文件\ Inno Setup的5個\實例。
拯救生命。感謝您的及時迴應 – SharpAffair 2011-02-02 15:21:55