Old 23rd May 2012, 06:30   #1
gretty
Junior Member
 
Join Date: May 2012
Posts: 20
Make CheckBox's background transparent when XPStyle is on

Hello

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%)?

code:
!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

gretty is offline   Reply With Quote
Old 23rd May 2012, 07:18   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 506
Send a message via ICQ to T.Slappy
Short answer: No

Long answer: There is some bug in drawing (handling WM_PAINT) message in this control so if you really want to have transparent checkboxes you need to subclass control and handle everything manually - try to write C/C++ plug-in for this.

Or you can try my tool - see signature

Cool looking skinned Graphical Installers: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsignedsw.com
Develop NSIS projects in Visual Studio 2005-2017: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.2 Tokyo: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump