在NSIS MUI2页面上更改Windows的z索引 [英] Alter the z-index of windows on a NSIS MUI2 Page

查看:62
本文介绍了在NSIS MUI2页面上更改Windows的z索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在NSIS MUI2页面上设置标题位图窗口的z-index?

我试图使一个包含大位图的窗口位于MUI2页面MUI_PAGE_WELCOME&上的其他窗口(标签,复选框等)的后面.MUI_PAGE_COMPONENTS.

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.

我已经看到我可以使用SetWindowPos,但是如何访问/查找与标题位图关联的HWND?

还有一种方法可以将静态,标签和复选框背景设置为透明?也许我可以使用Win32标志,还是应该使用透明位图?

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?

推荐答案

两个选项都是可能的.

要访问定义为MUI_HEADERIMAGE_BITMAP的位图,请使用其ID 1046(要查看这些ID,请使用ResHacker在NSIS \ Contrib \ UIs \文件夹中打开相应的.exe文件)

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)

然后使用 GetDlgItem OutputVar $ HWNDPARENT 1046进行处理.在NSIS中,所有WinAPI函数都可以正常工作.

Then use GetDlgItem OutputVar $HWNDPARENT 1046 to get handle on it. In NSIS all WinAPI functions work well.

1)创建整个背景非常棘手-需要大量编码.安装程序的窗口由外部和内部对话框组成,因此您需要添加两个位图(每个对话框一个)由于有很多代码,我可以向您推荐以下解决方案:用于NSIS的图形安装程序,用于创建外观精美的安装程序.

1) Creating whole background is very tricky - it requires a lot of coding. 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.

2):使用 SetCtlColors ControlHwnd TextColor透明这适用于大多数控件,但在WinXP上存在一些问题.另一种方法是子类化每个控件并覆盖它的WM_PAINT消息(编写简单的C插件).

2): Use SetCtlColors ControlHwnd TextColor transparent This works for most controls but there are some troubles with it on WinXP. The other way is to subclass every control and override it's WM_PAINT message (writing simple C plug-in).

这篇关于在NSIS MUI2页面上更改Windows的z索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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