2

i have installer where i want to display multiple bitmap images on the "wpInstalling" page .The images should be displayed one below another.

Axs
  • 755
  • 2
  • 14
  • 26
  • 1
    Why don't you merge those bitmaps into a single bitmap and display that one ? Or am I missing something in your *"one below another"* ? A screenshot or a better description would be useful. – TLama Feb 12 '14 at 10:56
  • 3 pictures files in a line or one below another. i am unable to attach images as i do not have 10 reputations.if you provide any script to display images i would be gratefull to you – Axs Feb 12 '14 at 11:09
  • Upload the image to imgur.com and post a link to the image. I'll embed it to your question... I wrote a few scripts for showing slideshows. For instance [`this one`](http://stackoverflow.com/a/14616734/960757) which includes also a music playback. And there will be more of them I think... But now the options are even better with the `CurInstallProgressChanged` event. – TLama Feb 12 '14 at 11:14
  • 1
    I agree with TLama -- unless you're wanting to do something weird like dynamically changing the images independently at runtime (some kind of animation effect), it's much simpler to just merge the images into a single bitmap and use that instead. – Miral Feb 13 '14 at 19:42

1 Answers1

1

TLama will probably give you better solution, but you may try something like this (of course you should modify it for your project)

[Files]
Source: ".\01.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
Source: ".\02.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression

[Code]
function InitializeSetup: Boolean;
begin
   ExtractTemporaryFile('01.bmp'); //here you extract your first BMP file to temp folder
   ExtractTemporaryFile('02.bmp'); //here you extract your second BMP file to temp folder
   Result := True;
end;

procedure CurPageChanged(CurPageID: Integer);
var
BmpFile1, BmpFile2: TBitmapImage;
begin
  if CurPageID = wpInstalling then begin 
      BmpFile1:= TBitmapImage.Create(WizardForm);
      BmpFile1.Bitmap.LoadFromFile(ExpandConstant('{tmp}\01.bmp'));
      BmpFile1.Width:= ScaleX(417);
// here you set Width (417px is Width of ProgressBar) for 1st BMP
      BmpFile1.Height:= ScaleY(50);
// here you set Height for 1st BMP
      BmpFile1.Stretch := True;
      BmpFile1.Left := WizardForm.ProgressGauge.Left + ScaleX(0); 
// here you set Left position for 1st BMP
      BmpFile1.Top := WizardForm.ProgressGauge.Top + ScaleY(35);
// here you set Top posision for 1st BMP
      BmpFile1.Parent:= WizardForm.InstallingPage;
      BmpFile2:= TBitmapImage.Create(WizardForm);
      BmpFile2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\02.bmp'));
      BmpFile2.Width:= ScaleX(417);
      BmpFile2.Height:= ScaleY(50);
      BmpFile2.Stretch := True;
      BmpFile2.Left := WizardForm.ProgressGauge.Left + ScaleX(0); 
      BmpFile2.Top := BmpFile1.Top + BmpFile1.Height + ScaleY(8);
      BmpFile2.Parent:= WizardForm.InstallingPage;
  end;
end;
RobeN
  • 5,346
  • 1
  • 33
  • 50
  • 2
    I doubt there is something "better" than what you've posted. Although my suggestion is to merge those bitmaps into one. Even MS Paint in Windows 95 would have been enough for this task. – TLama Feb 12 '14 at 12:23