Inno设置:TBitmapImage没有显示

PTS*_*PTS 5 inno-setup bitmap imagebutton

我想在TBitmapImage课堂上为我的Inno Script添加自定义设计的按钮.

我的Inno安装脚本编译得很好,但位图没有在表单中显示.我调查了任何可能性,但似乎无法找到我所犯的错误.这就是TBitmapImage部件看起来像atm:

procedure CreateMuteButton(ParentForm: TSetupForm);
var
  MuteImage: TBitmapImage;
  BitmapFileName: String;
begin
  BitmapFileName := ExpandConstant('{tmp}\muteBtn.bmp');
  ExtractTemporaryFile(ExtractFileName(BitmapFileName));
  MuteImage := TBitmapImage.Create(ParentForm);
  MuteImage.Bitmap.LoadFromFile(BitmapFileName);
  MuteImage.Cursor := crHand;
  MuteImage.OnClick := @MuteButtonOnClick;
  MuteImage.Parent := ParentForm;
  MuteImage.Left := 45;
  MuteImage.Top := 80
  MuteImage.Width := 38;
  MuteImage.Height := 50;
end;

procedure InitializeWizard();
var
  val: Integer;
begin
  CreateMuteButton(WizardForm);
  (...)
end;
Run Code Online (Sandbox Code Playgroud)

Dea*_*nna 5

WizardForm客户区本身只是底部斜切线下可见.上面是WizardForm.InnerPage,并且中间的个人/当前向导页面包含在私有中InnerNotebook.

这会将图像放在页面的左侧:

MuteImage := TBitmapImage.Create(WizardForm.InnerPage);
MuteImage.Parent := WizardForm.InnerPage;
MuteImage.Left := 0;
{ Uses the top of the wizard pages to line up }
MuteImage.Top := WizardForm.SelectDirPage.Parent.Top; 
Run Code Online (Sandbox Code Playgroud)

而这将它放在底部:

MuteImage := TBitmapImage.Create(WizardForm);
MuteImage.Parent := WizardForm;
MuteImage.Left := 0;
{ Below the inner page }
MuteImage.Top := WizardForm.InnerPage.Height; 
Run Code Online (Sandbox Code Playgroud)