在 Windows 7 中显示带有 Aero glass 的自定义安装程序图像

Display customized installer images with Aero glass in Windows 7

我已经添加了自定义安装程序图像,但是当您组合 Aero glass windows 7 时,它们不会显示。有什么解决办法吗?

这些图片是当您点击它们时指向 URL:

没有航空玻璃

带航空玻璃

我的代码

[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;

这是因为您将图片放入了透明区域。

将图像移动到 "inner area"(灰色的),它们应该是可见的。