Skip to content
⌘ NSIS Forum Archive

Set GroupBox background color

5 posts

Guest#

Set GroupBox background color

I am wanting to change the background colour for a GroupBox I created with nsDialogs.

I am using this code to try and achieve this (set the background to white).
${NSD_CreateGroupBox} 190u 30u 110u 100u "Plugins:"
Pop $0
SendMessage $0 EM_SETBKGNDCOLOR 0 "255 255 255" 
Can someone please tell me where I have gone wrong and what I need to do to set the background colour.

I also tried SetCtlColors but that didn't work, it just changed the colour of the text and the background of that text on the group box.
Afrow UK#
You have to use SetCtlColors. If it doesn't work then it's probably down to XP visual styles.

Stu
Guest#
Thanks for the reply.

${NSD_CreateGroupBox} 190u 30u 110u 100u "Plugins:"
Pop $0
SetCtlColors $0 0x000000 0xFFFFFF 
Would that be correct to set a white background colour?

If so then it must be the XP thing as you said.
Afrow UK#
Try redrawing the control:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Stu