Inno Setup: TBitmapImage не отображается

Я хочу добавить специально разработанные кнопки в свой Inno Script с помощью класса TBitmapImage.

Мой сценарий Inno Setup компилируется нормально, но растровое изображение не отображается в форме. Я изучил любые возможности, но не могу найти ошибку, которую я сделал. Вот как часть 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;
5
задан Martin Prikryl 23 September 2016 в 05:59
поделиться