Kus*_*hal 1 inno-setup pascalscript
我想在像所有的页面的左下角,以创建一个新的关于按钮wpWelcome,wpSelectTasks,wpInstalling等; 如果单击它,它将显示一些消息。如果用户按“确定”,消息应关闭。该按钮应显示完整的“关于”一词,而不是“关于...” 我已经CodeClasses.iss在 Inno Setup 中检查过文件,但我不明白我应该复制哪些代码,哪些不应该。
我已经看过这两个帖子:
但它们并不是我真正想要的。
所以请任何人帮忙。
这是执行您所要求的所需的最低代码的简化内联版本:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
[Code]
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('This is the about message!', mbInformation, mb_Ok);
end;
procedure InitializeWizard;
var
AboutButton: TNewButton;
begin
{ create an instance of the button and assign it to the local variable AboutButton }
AboutButton := TNewButton.Create(WizardForm);
{ set the parent to the just created button control }
AboutButton.Parent := WizardForm;
{ adjust the position to the created button control; it gets the horizontal indent }
{ by the right indent of the Cancel button; the vertical position as well as width }
{ and height are the same as the Cancel button has }
AboutButton.Left := WizardForm.ClientWidth - WizardForm.CancelButton.Left -
WizardForm.CancelButton.Width;
AboutButton.Top := WizardForm.CancelButton.Top;
AboutButton.Width := WizardForm.CancelButton.Width;
AboutButton.Height := WizardForm.CancelButton.Height;
{ set its caption }
AboutButton.Caption := '&About';
{ and assign the AboutButtonOnClick method to the OnClick event of the button }
AboutButton.OnClick := @AboutButtonOnClick;
end;
Run Code Online (Sandbox Code Playgroud)