[英]Alter the z-index of windows on a NSIS MUI2 Page
Is it possible to set the z-index of the header bitmap window on a NSIS MUI2 Page?是否可以在 NSIS MUI2 页面上设置标题位图窗口的 z-index?
I am trying to make a window that contains a large bitmap sit behind the other windows(labels, checkboxes etc.) on the MUI2 Pages MUI_PAGE_WELCOME & MUI_PAGE_COMPONENTS.我正在尝试在 MUI2 页面 MUI_PAGE_WELCOME 和 MUI_PAGE_COMPONENTS 上制作一个包含大位图的窗口(标签、复选框等)。
I have seen I could use SetWindowPos but how do I access/find the HWND associated with the header bitmap?我已经看到我可以使用 SetWindowPos 但我如何访问/找到与标题位图关联的 HWND?
Also is there a way to set a static, label and checkboxes background to transparent?还有一种方法可以将静态、标签和复选框背景设置为透明吗? Maybe theres a Win32 flag I can use, or should I use a transparent bitmap?
也许我可以使用 Win32 标志,还是应该使用透明位图?
Both options are possible.这两种选择都是可能的。
For accessing bitmap defined as MUI_HEADERIMAGE_BITMAP use it's ID which is 1046 (To see these IDs open appropriate .exe file in NSIS\\Contrib\\UIs\\ folder with ResHacker)要访问定义为 MUI_HEADERIMAGE_BITMAP 的位图,请使用其 ID 为 1046(要查看这些 ID,请使用 ResHacker 在 NSIS\\Contrib\\UIs\\ 文件夹中打开相应的 .exe 文件)
Then use GetDlgItem OutputVar $HWNDPARENT 1046 to get handle on it.然后使用GetDlgItem OutputVar $HWNDPARENT 1046 来处理它。 In NSIS all WinAPI functions work well.
在 NSIS 中,所有 WinAPI 函数都运行良好。
1) Creating whole background is very tricky - it requires a lot of coding. 1)创建整个背景非常棘手 - 它需要大量编码。 Installer's window consists from outer and inner dialogs so you need to add two bitmaps (one for each dialog) As this is a lot of code I can recommend you this solution: Graphical Installer for NSIS for creating cool looking installer.
安装程序的窗口由外部和内部对话框组成,因此您需要添加两个位图(每个对话框一个)因为这是很多代码,我可以向您推荐此解决方案:用于 NSIS 的图形安装程序,用于创建看起来很酷的安装程序。
2): Use SetCtlColors ControlHwnd TextColor transparent This works for most controls but there are some troubles with it on WinXP. 2): 使用SetCtlColors ControlHwnd TextColor transparent 这适用于大多数控件,但在 WinXP 上有一些问题。 The other way is to subclass every control and override it's WM_PAINT message (writing simple C plug-in).
另一种方法是对每个控件进行子类化并覆盖它的 WM_PAINT 消息(编写简单的 C 插件)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.