向InnoSetup向导页面添加帮助按钮 [英] Adding a help button to an InnoSetup wizard page

查看:436
本文介绍了向InnoSetup向导页面添加帮助按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有自定义向导页面的安装脚本,可以从用户那里进行选择.最好有一个帮助按钮,并提供一个带有可安装程序的CHM小文件,以便我对选择的内容进行详细说明.

I have a setup script with a custom wizard page to get a choice from the user. It would be nice to have a help button and to supply a small CHM file with the installable so that I can provide a detailed explanation of what the choices are.

任何人都知道是否有一种简便的方法吗?

Anyone know whether there is an easy way to do this?

推荐答案

请参见

See this post for details on how to include a file with the installation package and reference that file before installation has started.

要向安装向导添加按钮,我在InitializeWizard事件处理程序中包含了以下代码.

To add a button to the install wizard, I included the following code in the InitializeWizard event handler.

procedure CreateHelpButton (ParentForm   : TSetupForm ; 
                            X            : integer ;
                            Y            : integer ;
                            W            : integer ;
                            H            : integer) ;

var
  HelpButton : TNewButton ;
begin
  HelpButton         := TNewButton.Create (ParentForm) ;
  HelpButton.Left    := X ;
  HelpButton.Top     := Y ;
  HelpButton.Width   := W ;
  HelpButton.Height  := H ;
  HelpButton.Caption := '&Help' ;
  HelpButton.OnClick := @HelpButtonOnClick ;
  HelpButton.Parent  := ParentForm ;
end;

procedure InitializeWizard () ;

begin
  CreateHelpButton (
    WizardForm, ScaleX (20), WizardForm.CancelButton.Top,
    WizardForm.CancelButton.Width, WizardForm.CancelButton.Height) ;
end;  

这篇关于向InnoSetup向导页面添加帮助按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆