imageinno-setupaero-glass

Display customized installer images with Aero glass in Windows 7


I have added custom installer images, but when you combine the Aero glass windows 7, they aren't displayed. Is there any solution?

These images are when you are clicking them to lead to a URL:

Without Aero Glass

without aero glass

With Aero Glass

with aero glass

My Code

[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application

[Files]
Source: "face.bmp"; Flags: dontcopy
Source: "suscri.bmp"; Flags: dontcopy
Source: "logo.bmp"; Flags: dontcopy

[Code]
procedure MyImageClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('open', 'http://www.facebook.com/williamsgamer', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure MyImageClick2(Sender: TObject);
var
  ErrorCode2: Integer;
begin
  ShellExec('open', 'http://www.youtube.com/williams117gamer', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode2);
end;

procedure MyImageClick3(Sender: TObject);
var
  ErrorCode3: Integer;
begin
  ShellExec('open', 'http://williamsmz98.wix.com/l4d-updates', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode3);
end;

procedure CreateMyImage();
begin
  ExtractTemporaryFile('face.bmp');
  with TBitmapImage.Create(WizardForm) do
  begin
    Parent := WizardForm;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\face.bmp'));
    AutoSize := True;
    Left := 20;
    Top := 320;
    Cursor := crHand;
    OnClick := @MyImageClick;
  end;
end;

procedure CreateMyImage2();
begin
  ExtractTemporaryFile('suscri.bmp');
  with TBitmapImage.Create(WizardForm) do
  begin
    Parent := WizardForm;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\suscri.bmp'));
    AutoSize := True;
    Left := 70;
    Top := 320;
    Cursor := crHand;
    OnClick := @MyImageClick2;
  end;
end;

procedure CreateMyImage3();
begin
  ExtractTemporaryFile('logo.bmp');
  with TBitmapImage.Create(WizardForm) do
  begin
    Parent := WizardForm;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp'));
    AutoSize := True;
    Left := 130;
    Top := 320;
    Cursor := crHand;
    OnClick := @MyImageClick3;
  end;
end;

procedure InitializeWizard1;
begin
  CreateMyImage();
  CreateMyImage2();
  CreateMyImage3();
end;
[Setup]

[Files]
Source: compiler:Dll Pack\iswin7.dll; Flags: dontcopy

[Code]
procedure iswin7_add_glass(Handle:HWND; Left, Top, Right, Bottom : Integer; GDIPLoadMode: boolean); external 'iswin7_add_glass@files:iswin7.dll stdcall';
procedure iswin7_add_button(Handle:HWND); external 'iswin7_add_button@files:iswin7.dll stdcall';
procedure iswin7_free; external 'iswin7_free@files:iswin7.dll stdcall';

procedure InitializeWizard2();
begin
  iswin7_add_button(WizardForm.BackButton.Handle);
  iswin7_add_button(WizardForm.NextButton.Handle);
  iswin7_add_button(WizardForm.CancelButton.Handle);
  iswin7_add_glass(WizardForm.Handle, 0, 0, 0, 47, True);
end;

procedure DeinitializeSetup2();
begin
  iswin7_free;
end;
[Setup]

[Code]

procedure InitializeWizard();
begin
  InitializeWizard1();
  InitializeWizard2();
end;

procedure DeinitializeSetup();
begin
  DeinitializeSetup2();
end;

Solution

  • This is because you have placed the images into area which becomes transparent.

    Move the images to the "inner area" (the grey one) and they should be visible.