inno-setup - 在 Inno Setup 中,如何在向导窗口的左下方添加图像横幅?
解决方案
正如@TLama 评论的那样:创建一个TBitmapImage
,将其父级设置为WizardForm
,将其放置在您想要的位置并从文件中加载图片。
[Files]
Source: "logo.bmp"; Flags: dontcopy
[Code]
<event('InitializeWizard')>
procedure InitializeWizardAddLogo();
var
Image: TBitmapImage;
begin
Image := TBitmapImage.Create(WizardForm);
with Image do
begin
Parent := WizardForm;
ExtractTemporaryFile('logo.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp');
AutoSize := True;
AutoSize := False;
Width := ScaleX(Width);
Height := ScaleY(Height);
Stretch := True;
Left := ScaleX(10);
Top :=
(WizardForm.ClientHeight + WizardForm.Bevel.Top + WizardForm.Bevel.Height - Height)
div 2;
end;
end;
(代码 [with event
attribute] 用于 Inno Setup 6)
虽然棘手的部分是正确处理屏幕缩放。因此,AutoSize
伎俩和Scale*
电话。
您甚至可能需要针对不同比例因子使用不同版本的徽标。
请参阅Inno Setup WizardImageFile 在 Windows 7 上的字体缩放看起来很糟糕
推荐阅读
- linux - 修改正在运行的 docker 容器的 hosts 文件
- php - Getting the HTML code of a chart created by chart.js
- javascript - Testing decorated constructor parameters
- r - 聚类作为一种降维技术,如何为每个聚类选择代表元素?
- r - positional number for melted data
- sql-server - Airflow SQL Server compatibility
- c++ - 条件变量的while循环
- python - 如何在 Python 熊猫中使用 pd.melt
- ios - 为什么 Auth.auth().currentUser?.uid 返回 nil 值?
- c - Giving specific values but returns wrong pointer