Old 23rd May 2012, 05:30   #1
Junior Member
Join Date: May 2012
Posts: 20
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


Section dummy

gretty is offline   Reply With Quote
Old 23rd May 2012, 06:18   #2
Major Dude
T.Slappy's Avatar
Join Date: Jan 2006
Location: Slovakia
Posts: 531
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 installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
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