本文介绍了在整个安装过程中可见的单独窗口中显示消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在InfoBeforeFile
指令中使用了重要声明"文本文件.
I already used InfoBeforeFile
directive, with an "Important notice" text file.
但是我希望用户可以在整个安装过程中(例如在单独的窗口中)继续阅读说明.
But I would prefer the user could continue to read the instructions throughout an installation (e.g. in a separate window).
有任何线索吗?
添加了最终结果,再次感谢Martin Prikryl
Added the final result, thanks again to Martin Prikryl
推荐答案
使用 函数为您的消息创建一个单独的窗口.
Use CreateCustomForm
function to create a separate window for your message.
[Files]
Source: "important.txt"; Flags: dontcopy;
[Code]
procedure InitializeWizard();
var
InfoForm: TSetupForm;
InfoMemo: TRichEditViewer;
begin
InfoForm := CreateCustomForm;
Log(IntToStr(WizardForm.Left));
Log(IntToStr(WizardForm.Width));
InfoForm.Left := WizardForm.Left + WizardForm.Width;
InfoForm.Width := ScaleX(400);
InfoForm.Caption := 'Important message';
InfoForm.Top := WizardForm.Top;
InfoForm.Height := WizardForm.Height;
InfoForm.Position := poDesigned;
InfoForm.Show();
InfoMemo := TRichEditViewer.Create(InfoForm);
InfoMemo.Parent := InfoForm;
InfoMemo.Left := ScaleX(40);
InfoMemo.Top := ScaleX(40);
InfoMemo.Width := InfoForm.ClientWidth - 2 * ScaleX(40);
InfoMemo.Height := InfoForm.ClientHeight - 2 * ScaleX(40);
InfoMemo.ScrollBars := ssVertical;
InfoMemo.ReadOnly := ssVertical;
InfoMemo.WantReturns := ssVertical;
InfoMemo.WantReturns := False;
ExtractTemporaryFile('important.txt');
InfoMemo.Lines.LoadFromFile(ExpandConstant('{tmp}\important.txt'));
end;
这篇关于在整个安装过程中可见的单独窗口中显示消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!