Cambiar el tamaño del cuadro de licencia no funcionó demasiado bien, así que en su lugar terminamos proporcionando un botón para ver la licencia en WordPad. Esto funciona sorprendentemente bien; Me gustó bastante al final. Código:
procedure ViewLicenseButtonClick(Sender: TObject);
var WordpadLoc: String;
RetCode: Integer;
begin
RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WORDPAD.EXE', '', WordpadLoc);
// on NT/2000 it's a REG_EXPAND_SZ, so expand constant ProgramFiles
StringChange(WordpadLoc, '%ProgramFiles%', ExpandConstant('{pf}'));
// remove " at begin and end pf string
StringChange(WordpadLoc, '"', '');
try
ExtractTemporaryFile('LicenseAgreement.rtf')
except
MsgBox('Cannot extract license file.', mbError, mb_Ok);
end;
if not Exec(WordpadLoc, '"' + ExpandConstant('{tmp}\LicenseAgreement.rtf') + '"', '', SW_SHOW, ewNoWait, RetCode) then
MsgBox('Cannot display license file.', mbError, mb_Ok);
end;
procedure CurPageChanged(CurPageID: Integer);
var ViewLicenseButton: TButton;
begin
if CurPageID = wpLicense then begin
ViewLicenseButton := TButton.Create(WizardForm.LicenseMemo.Parent);
ViewLicenseButton.Caption := '&View in WordPad';
ViewLicenseButton.Width := 120;
ViewLicenseButton.Left := WizardForm.LicenseMemo.Left +
WizardForm.LicenseMemo.Width - ViewLicenseButton.Width;
ViewLicenseButton.Top := WizardForm.LicenseMemo.Top +
WizardForm.LicenseMemo.Height + 16;
ViewLicenseButton.OnClick := @ViewLicenseButtonClick;
ViewLicenseButton.Parent := WizardForm.LicenseAcceptedRadio.Parent;
end;
end;
Solo quería mencionar que no usamos esto al final. El problema es que si el usuario mueve el instalador (por ejemplo, a un monitor diferente), este código lo restablece a su posición predeterminada. Lo cual es bastante molesto Dejaré esto aceptado porque es la única respuesta que aborda la pregunta, pero también he publicado el código del botón de WordPad como una respuesta separada. –