通过“添加自定义页面”可以丰富安装程序的功能。本文以添加一个页面“选择安装类型”为例,选择标准安装将跳过“选择目标位置”和“选择开始菜单文件夹”两个页面。
在[Code]段添加以下代码:
var Page: TWizardPage; RadioButton1, RadioButton2: TRadioButton; Lbl1, Lbl2: TNewStaticText; procedure CreateAddonPage; begin Page := CreateCustomPage(wpInfoBefore, '选择安装类型', '请根据您的需要选择安装的类型'); RadioButton1 := TRadioButton.Create(Page); RadioButton1.Left := ScaleX(80); RadioButton1.Top := ScaleY(40); RadioButton1.Width := Page.SurfaceWidth; RadioButton1.Height := ScaleY(