Guest User

InnoScript

a guest
Nov 4th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Setup]
  2. AppName=My Program
  3. AppVersion=1.5
  4. DefaultDirName={pf}\My Program
  5. OutputDir=userdocs:Inno Setup Examples Output
  6.  
  7. [Files]
  8. Source: Welcome.rtf; Flags: dontcopy
  9.  
  10. [CustomMessages]
  11. ISCustomPage1_Caption=Welcome to the Installation Wizard
  12. ISCustomPage1_Description=This is a welcome page
  13.  
  14. [Code]
  15. var
  16.  
  17. ISCustomPage1: TWizardPage;
  18. RichEditViewer1: TRichEditViewer;
  19.  
  20. procedure InitializeWizard();
  21. var
  22.   RtfName: string;
  23.   Rtf: AnsiString;
  24.  
  25.  begin
  26.  { Creates custom wizard page }
  27.         ISCustomPage1 :=
  28.             CreateCustomPage(
  29.               wpWelcome, CustomMessage('ISCustomPage1_Caption'),
  30.               CustomMessage('ISCustomPage1_Description'));
  31.              
  32.         { RichEditViewer1 }
  33.           RichEditViewer1 := TRichEditViewer.Create(WizardForm);
  34.           with RichEditViewer1 do
  35.           begin
  36.             Parent := ISCustomPage1.Surface;
  37.             Left := ScaleX(0);
  38.             Top := ScaleY(0);
  39.             Width := ScaleX(500);
  40.             Height := ScaleY(270);
  41.             ReadOnly := True;
  42.             ScrollBars := ssVertical;
  43.  
  44.         RtfName := 'Welcome.rtf';
  45.             ExtractTemporaryFile(RtfName);
  46.             if LoadStringFromFile(ExpandConstant('{tmp}\' +RtfName), Rtf) then
  47.                 begin
  48.                   UseRichEdit := True;
  49.                   RTFText  := Rtf;
  50.                 end;
  51.          end;
  52. end;
Add Comment
Please, Sign In to add comment