How about ?, I have a problem with my code. the problem is that I can choose if I have music using this code:
function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean;
external 'BASS_Init@files:BASS.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD;
external 'BASS_StreamCreateFile@files:BASS.dll stdcall';
function BASS_Start(): Boolean;
external 'BASS_Start@files:BASS.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean;
external 'BASS_ChannelPlay@files:BASS.dll stdcall';
function BASS_Stop(): Boolean;
external 'BASS_Stop@files:BASS.dll stdcall';
function BASS_Free(): Boolean;
external 'BASS_Free@files:BASS.dll stdcall';
const
BASS_SAMPLE_LOOP = 4;
procedure InitializeWizard();
var
mp3Handle: HWND;
mp3Name: string;
begin
RedesignWizardForm;
ExtractTemporaryFile('sound.mp3');
mp3Name := ExpandConstant('{tmp}\sound.mp3');
BASS_Init(-1, 44100, 0, 0, 0);
mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
BASS_Start();
BASS_ChannelPlay(mp3Handle, False);
end;
procedure DeinitializeSetup();
begin
BASS_Stop();
BASS_Free();
end;
procedure RedesignWizardForms;
begin
with WizardForm.ProgressGauge do
begin
Height := ScaleY(13);
end;
I think I remember taking it out of this website, and it works perfectly. the problem is that I also have this that is the background image
#define ISSI_BackgroundImage "C:\ISSI_side.bmp"
I realized that using the background or the music works perfectly, but if I activate both, only the background works because it is on top of the code.
I was also trying to use this code, which I found on this website:
files
Source: "C:\Users\nahue\Desktop\probando\back.bmp"; Flags: dontcopy
code
procedure InitializeWizarda();
var
BackgroundImage: TBitmapImage;
begin
BackgroundImage := TBitmapImage.Create(MainForm);
BackgroundImage.Parent := MainForm;
BackgroundImage.SetBounds(0, 0, MainForm.ClientWidth, MainForm.ClientHeight);
BackgroundImage.Stretch := True;
ExtractTemporaryFile('C:\Users\nahue\Desktop\probando\back.bmp');
BackgroundImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\C:\Users\nahue\Desktop\probando\back.bmp'));
end;
also probe in these lines
'ExtractTemporaryFile('C:\Users\nahue\Desktop\probando\back.bmp');'
BackgroundImage.Bitmap.LoadFromFile(ExpandConstant('back.bmp'));
remove c: / ... and leave only the back.bmp
but it does not work or it is not loaded, put the WindowVisible = true but leave it blue (by default) in inno ide, probe inno setup but it is the same.
I hope you can help me because I do not know what to do anymore. greetings and thank you very much