View Single Post
  #3  
Old 19-01-2013, 13:55
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,749
Thanks: 2,170
Thanked 11,206 Times in 2,307 Posts
Razor12911 is on a distinguished road
Quote:
Originally Posted by Andre Jesus View Post
Hello.

I loaded 4 images .jpg (with botva2.dll) to use like background on my installer, however, the images just stay in welcome page (ID wpWelcome) one upon another.
How can i set each image like background in your respective page?

This is my idea:
image 1.jpg like bagkground on Welcomepage (wpWelcome)
image 2.jpg like background on Readypage (wpReady)
image 3.jpg like background on Installpage (wpInstalling)
image 4.jpg like background on Finishedpage (wpFinished)

This is my script.
Code:
#include "Install\botva2.iss"

[Setup]
AppName=Game Setup
AppVerName=Game Setup
OutputDir=.
DefaultDirName={pf}\Game Setup
OutputBaseFilename=Game Setup
DisableProgramGroupPage=yes
DisableDirPage=yes
Compression=none
;lzma2/Ultra64
SolidCompression=no
SetupIconFile=Install\ico.ico
;SlicesPerDisk=1
;DiskSliceSize=1073741824
;DiskSpanning=yes
      
[Files]
;Source: Game Setup\*; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: Install\*; Flags: dontcopy

Code
var
h:HWND;

procedure LoadSkin(lpszPath: String; lpszIniFileName: String);external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin();external 'UnloadSkin@files:isskin.dll stdcall';

procedure InitializeWizard();
begin
ExtractTemporaryFile('botva2.dll');
ExtractTemporaryFile('1.jpg');
ExtractTemporaryFile('2.jpg');
ExtractTemporaryFile('3.jpg');
ExtractTemporaryFile('4.jpg');
ExtractTemporaryFile('glass.png');
ExtractTemporaryFile('skin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\skin.cjstyles'), '');

with WizardForm do begin
Position:=poScreenCenter; 
InnerNotebook.Hide;
OuterNotebook.Hide;
WelcomeLabel1.Hide;
WelcomeLabel2.Hide;
FinishedLabel.Hide;
FinishedHeadingLabel.Hide;
PageDescriptionLabel.Hide; 
PageNameLabel.Hide;
Bevel.Hide;
BorderStyle:= bsDialog;
ClientWidth:=600 
ClientHeight:=400
CancelButton.SetBounds(520,360,60,30);
NextButton.SetBounds(450,360,60,30);
BackButton.SetBounds(380,360,60,30);
end;

h:=WizardForm.Handle;
ImgLoad(h,ExpandConstant('{tmp}\1.jpg'),0,0,600,400,True,True);
ImgLoad(h,ExpandConstant('{tmp}\2.jpg'),0,0,600,400,True,True);
ImgLoad(h,ExpandConstant('{tmp}\3.jpg'),0,0,600,400,True,True); 
ImgLoad(h,ExpandConstant('{tmp}\4.jpg'),0,0,600,400,True,True);
ImgLoad(h,ExpandConstant('{tmp}\glass.png'),20,130,560,220,True,True); 
ImgApplyChanges(WizardForm.Handle);
end;

procedure DeinitializeSetup();
begin
gdipShutdown;
UnloadSkin();
end;
Use Procedure CurpageChanged

Last edited by Razor12911; 20-01-2013 at 00:07.
Reply With Quote