[英]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.