简体   繁体   English

打开XPStyle时,使CheckBox的背景透明

[英]Make CheckBox's background transparent when XPStyle is on

Is it possible to make a Checkboxes background transparent when XPStyle is on? 当XPStyle打开时,是否可以使Checkboxes背景透明?

The following simple code can make the Checkbox background transparent but ONLY if XPStyle is set to off. 以下简单代码可以使Checkbox背景透明,但仅限XPStyle设置为off。

Is there a way to get the checkbox's background transparent while keeping XPStyle on? 有没有办法在保持XPStyle的同时让复选框的背景透明? I really hope so, otherwise I have big problems. 我真的希望如此,否则我有很大的问题。 I'm open to really out there ideas, no matter how involved they are. 无论他们如何参与,我都愿意接受这些想法。

If theres no way, is it possible to alter the opacity of the checkbox background - maybe I can make it slightly transparent(50%)? 如果没有办法,是否可以改变复选框背景的不透明度 - 也许我可以使它略微透明(50%)?

!include "LogicLib.nsh"
!include "MUI2.nsh"
!include WinMessages.nsh

OutFile "abc.exe"
Page Custom CustomPageInitialise

XPStyle on

Function CustomPageInitialise
    nsDialogs::Create 1018
    Pop $0
    SetCtlColors $0 0xFF0000 0x00FF00

    ${NSD_CreateCheckbox} 25u 20u 100% 20u "Version 8"
    Pop $1
    SetCtlColors $1 0xFF0000 transparent                        # Set tranparent color for control 
    ${NSD_AddExStyle} $1 ${WS_EX_TRANSPARENT}|${WS_EX_TOPMOST}  # Add special style 

    nsDialogs::Show
FunctionEnd

Section dummy
SectionEnd

I already linked to a bug report about this in one of your other questions. 我已经在其他一个问题中将错误报告与此相关联。 This is probably a limitation/bug in the theme engine and/or the visual style and to work around it you probably have to create a plugin that subclasses the checkbox and performs painting to a bitmap with WM_PRINT or something like that... 这可能是主题引擎和/或视觉样式中的限制/错误,并且要解决它,您可能必须创建一个插件,该子插件将复选框子类化并使用WM_PRINT或类似的东西对位图执行绘制...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使MUI2欢迎页面标签具有透明背景 - Make MUI2 Welcome Page labels have transparent background 使用msiexec在cmdline中运行时,复选框的值从空白更改为true - Checkbox's value is changed from blank to true when run in cmdline with msiexec 你如何制作一个非常好的安装程序,如Visual Studio? - How do you make a really nice installer like Visual Studio's? 没有index.php时,如何使.php的行为像index.php? - How to make a .php act like index.php when there's no index.php? 选择单选按钮时如何取消选中复选框 - How to uncheck a CheckBox when a RadioButton is selected 在Visual Studio安装程序中添加Project输出时,如何添加Project Dependency DLL? - How to add Project Dependency DLL's when adding Project output in the Visual Studio installer? VS MSI安装程序项目已安装时正在寻找ASP.NET - VS MSI installer project looking for ASP.NET when it's already installed “只读”或“禁用灰色任务”复选框? - ReadOnly or Disabled-Grayed Task checkbox? XAMPP安装程序具有黑色背景且没有文本 - XAMPP installer has black background and no text WiX修补程序对话框-未显示背景图片 - WiX Patch dialog - background image not shown
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM