English 中文(简体)
Inno 设置: TBitmapImagage 没有出现
原标题:Inno Setup: TBitmapImage isn t showing up

我要在我的 Inno 脚本中添加自定义的按钮, 加上 < code> TBUITmapImaage 类 。

我的Inno Setup 脚本编译得很好, 但位图没有在窗体中显示。 我查看了任何可能性, 但找不到错误 。 这就是 < code> tabitmapImaage 部分看起来像 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;
最佳回答

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; 

由此可见,在下一节中:

MuteImage := TBitmapImage.Create(WizardForm);
MuteImage.Parent := WizardForm;
MuteImage.Left := 0;
{ Below the inner page }
MuteImage.Top := WizardForm.InnerPage.Height; 
问题回答

暂无回答




相关问题
Algorithm to reduce image to rectangles?

I m attempting to create pretty large bitmaps in a C# application (6000x6000, though most is transparent) and need to draw them to a specific output API which only supports drawing rectangles. Now, I ...

Graphics.DrawImage Doesn t Always Paint The Whole Bitmap?

I have run into a strange problem when using Graphics.DrawImage. When using e.Graphics.DrawImage(Image, Point) in OnPaint to paint a bitmap buffer on the control, it appears that parts of the ...

Why doesn t FastBitmap get garbage collected?

So I ve finally located a problem I have with growing memory consumption. It s the class below, which for some reason doesn t get garbage collected. What would be the problem? The idea of the ...

Rendering form to bitmap

I would like to render Form to bitmap... Is it possible in .net 2.0?

add file icon to datagrid in flex

I m trying to put some File objects into a DataGrid, but I can t find a way to display the File.icon in there. So far I have this: (ms[x] is a File) listData.addItem({ filename:ms[x].nativePath....

Copy bytes in memory to an Array in VB.NET

unfortunately I cannot resort to C# in my current project, so I ll have to solve this without the unsafe keyword. I ve got a bitmap, and I need to access the pixels and channel values directly. I d ...

convert movie file to bitmap files with DirectShow

I want to convert movie files like AVI, MOV etc. to Bitmap-Files, like JPEG, JPEG2000, TIFF etc. Is it possible to realize that with DirectX / DirectShow? Is AVCodec from ffmpeg the much more better ...

热门标签