function IsWindowEnabled(hWnd: HWND): BOOL; external 'IsWindowEnabled@user32.dll stdcall';
procedure InitializeWizard();
begin
WizardForm.LICENSEACCEPTEDRADIO.Hide;
WizardForm.LICENSENOTACCEPTEDRADIO.Hide;
WizardForm.LICENSEACCEPTEDRADIO.Checked := True;
WizardForm.LICENSEMEMO.Height := 170;
with TLabel.Create(WizardForm) do
begin
Parent := WizardForm.LicensePage;
Top := 200;
Left := 2;
Caption := '如果你点击“我同意”进入下一页面,即表示你同意以上协议。';
end;
end;
procedure DeinitializeSetup();
begin
stoptimer();
end;
procedure CurPageChanged(CurPageID: Integer);
begin
//一定要别人先看协议20秒,即使返回欢迎页面,秒数倒数会停止,再进入协议秒数倒数继续
if CurPageID = wpLicense then
starttimer(WizardForm.Handle,WizardForm.NEXTBUTTON.Handle,'我同意(&I)',20)
else
if (CurPageID = wpWelcome) or (CurPageID = wpSelectDir) then
begin
stoptimer();
WizardForm.NEXTBUTTON.Caption := '下一步(&N) >';
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if (CurPageID = wpLicense) then
Result := IsWindowEnabled(WizardForm.NextButton.Handle)
else
Result := True;
end;