如何添加第二个许可页

 

[Code]
var
  Label1: TLabel;
  Memo1: TMemo;
  RadioButton1: TRadioButton;
  RadioButton2: TRadioButton;
procedure CustomForm_Activate(Page: TWizardPage);
begin
  if RadioButton1.Checked = True then
    WizardForm.NextButton.Enabled := True
  else
    WizardForm.NextButton.Enabled := False;
end;
procedure Radio1_OnClick(Sender: TObject);
begin
  WizardForm.NextButton.Enabled := True;
end;
procedure Radio2_OnClick(Sender: TObject);
begin
  WizardForm.NextButton.Enabled := False;
end;
function CustomForm_ShouldSkipPage(Page: TWizardPage): Boolean;
begin
  Result := False;
end;
function CustomForm_BackButtonClick(Page: TWizardPage): Boolean;
begin
  Result := True;
end;
function CustomForm_NextButtonClick(Page: TWizardPage): Boolean;
begin
  Result := True;
end;
procedure CustomForm_CancelButtonClick(Page: TWizardPage; var Cancel, Confirm: Boolean);
begin
end;
function CustomForm_CreatePage(PreviousPageId: Integer): Integer;
var
  Page: TWizardPage;
begin
  Page := CreateCustomPage(
    PreviousPageId,
    SetupMessage(msgWizardLicense),
    SetupMessage(msgLicenseLabel)
  );
  { Label1 }
  Label1 := TLabel.Create(Page);
  with Label1 do
  begin
    Parent := Page.Surface;
    WordWrap := True;
    Left := ScaleX(0);
    Top := ScaleY(0);
    Width := ScaleX(414);
    Height := ScaleY(26);
    Caption := SetupMessage(msgLicenseLabel3);
  end;
  { Memo1 }
  Memo1 := TMemo.Create(Page);
  with Memo1 do
  begin
    Parent := Page.Surface;
    Left := ScaleX(0);
    Top := ScaleY(40);
    Width := ScaleX(413);
    Height := ScaleY(145);
    Lines.Add('Memo1');
    ReadOnly := True;
    TabOrder := 0;
  end;
  { RadioButton1 }
  RadioButton1 := TRadioButton.Create(Page);
  with RadioButton1 do
  begin
    Parent := Page.Surface;
    Left := ScaleX(0);
    Top := ScaleY(196);
    Width := ScaleX(169);
    Height := ScaleY(17);
    Caption := SetupMessage(msgLicenseAccepted);
    TabOrder := 1;
    OnClick := @Radio1_OnClick;
  end;
  { RadioButton2 }
  RadioButton2 := TRadioButton.Create(Page);
  with RadioButton2 do
  begin
    Parent := Page.Surface;
    Left := ScaleX(0);
    Top := ScaleY(216);
    Width := ScaleX(169);
    Height := ScaleY(17);
    Caption := SetupMessage(msgLicenseNotAccepted);
    Checked := True;
    TabOrder := 2;
    TabStop := True;
    OnClick := @Radio2_OnClick;
  end;
  with Page do
  begin
    OnActivate := @CustomForm_Activate;
    OnShouldSkipPage := @CustomForm_ShouldSkipPage;
    OnBackButtonClick := @CustomForm_BackButtonClick;
    OnNextButtonClick := @CustomForm_NextButtonClick;
    OnCancelButtonClick := @CustomForm_CancelButtonClick;
  end;
  Result := Page.ID;
end;
procedure InitializeWizard();
begin
  CustomForm_CreatePage(wpLicense);
end;

你可能感兴趣的:(职场,休闲,如何添加第二个许可页)