简体   繁体   中英

Make CheckBox's background transparent when XPStyle is on

Is it possible to make a Checkboxes background transparent when XPStyle is on?

The following simple code can make the Checkbox background transparent but ONLY if XPStyle is set to off.

Is there a way to get the checkbox's background transparent while keeping XPStyle on? 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%)?

!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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM