如何将图像背景添加到自定义 MSI 对话框? [英] How to add image background to custom MSI dialog?

查看:32
本文介绍了如何将图像背景添加到自定义 MSI 对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 wxs 文件中有一个自定义的 MSI 对话框:

I have a custom MSI dialog in my wxs file:

<Dialog Id="OpDialog" Width="300" Height="250" Title="[ProductName]: Operations">
    ...
</Dialog>

如何将其背景设置为某个图像文件 (bmp/png/...)?

How can I set its background to some image file (bmp/png/...)?

推荐答案

快速链接:从 WiX 自己的教程中盗链(直接链接)单个页面(另请查看其他页面):https://www.firegiant.com/wix/tutorial/user-interface-revisited/tuning-up/

示例 WiX 标记下载:SampleCustomUI

Sample WiX Markup Download: SampleCustomUI

不确定这一切在高 DPI 屏幕上的表现如何.

Not sure how this all behaves on high DPI screens.

<小时>

Generic Trick:WiX 工具包 dark.exe 工具可以反编译 MSI 文件(dark.exe -x 输出文件.msi).您可以使用反编译的文件来找出文档不足的语法.我反编译了一个 MSI 并将它与我链接到的样本结合起来,你可以尝试这样的事情(这并没有显示如何将对话框插入到一个序列中,我不确定所有的结构都很好,但它编译正常):


Generic Trick: The WiX toolkit dark.exe tool can decompile an MSI file (dark.exe -x Output File.msi). You can use the decompiled files to figure out syntax that is poorly documented. I decompiled an MSI and combining it with the samples I linked to, you can try something like this (this does not show how to insert the dialog into a sequence, and I am not sure all constructs are good, but it compiles OK):

<!--<Binary Id="bannerbmp" SourceFile="Banner.bmp" />-->
<Binary Id="imagebmp" SourceFile="Image.bmp" />

<!--<Property Id="BannerBitmap">bannerbmp</Property>-->
<Property Id="ImageBitmap">imagebmp</Property>

<Dialog Id="ServerDlg" Width="370" Height="270" Title="Dialog Title">
  <!--<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="[BannerBitmap]" />-->
  <Control Id="Image" Type="Bitmap" X="0" Y="0" Width="374" Height="234" TabSkip="yes" Disabled="yes" Text="[ImageBitmap]" />

  <..>

</Dialog>

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆