- NSIS Discussion
- SetCtlColors on 1006 (detailprint)
Archive: SetCtlColors on 1006 (detailprint)
Ender7584
23rd December 2005 22:38 UTC
SetCtlColors on 1006 (detailprint)
I am trying to change the color of the detailprint message, so that it's easier to read. Basically, it works the first time, but when I try to print something else, it does not clear the original text, and just writes over it. Is there any way to clear window 1006?
Here is what I'm using to change its color:
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006
SetCtlColors $0 0x49564 transparent
I've tried everything I can think of to clear this, but am having no luck.
Thanks,
Ender7584
Joel
24th December 2005 00:39 UTC
I have a personal plugin, but is easly made by pure NSIS native code...
1. Save the current listview text color.
2. Apply yours...
3. Return the old ones...
easy :up:
Joel
24th December 2005 00:45 UTC
Sorry
forgot to include my personal plugin... I'm like a n00b :tinfoil:
kichik
24th December 2005 11:19 UTC
There's no need for a plug-in or SetCtlColors. Use InstallColors.
Joel
24th December 2005 14:50 UTC
Originally posted by kichik
There's no need for a plug-in or SetCtlColors. Use InstallColors.
Can InstallColors place a image in the background of the ListView? ;)
dandaman32
25th December 2005 22:13 UTC
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006
SetCtlColors $0 0x49564 transparent
The "0x49564" should be 6 digits. Otherwise NSIS won't skin it properly.
-dandaman32
Joel
25th December 2005 23:12 UTC
But that would change the hole LogWindow text color...for what I understand..the author of the topic want to change the color of one DetailPrint...
deguix
26th December 2005 13:27 UTC
Joel, I don't think that would be possible without subclassing the control to control it's procedure for painting the items. This can only be done using other plug-ins or using the System plug-in (which hard to use for great amounts of code).
Ender7584
27th December 2005 20:17 UTC
Joel is correct. I only want to change the text color of the text above the install box window, not the install box, so unfortunately installcolors won't work.
Changing the hex color to 6 digits did not affect anything either.
I will try Joel's plugin, and hope it works :)
Ender7584
27th December 2005 20:27 UTC
Still not what I need :(
I need to change the text above the window, not the text in the window. It's just not as readable as Id like it to be.
My example above works once. The problem is that I have no way of clearing it. When I try to detailprint a second time, it just writes over the text, instead of clearing the previous text, then printing.
Anyone have an idea how to do this?
Joel
28th December 2005 15:31 UTC
I am trying to change the color of the detailprint message
I only want to change the text color of the text above the install box window, not the install box
:igor: wtf? You lost me man? :igor:
Afrow UK
28th December 2005 16:55 UTC
He means the static label above the progress bar, not an item in the list view control.
Your code looks O.K. but where are you using it?
Try using it in the INSTFILES pages' SHOW function.
-Stu
deguix
28th December 2005 18:00 UTC
There is no easy solution for this. You can't use:
- "transparent" because it's even transparent for the control previous painting.
- ommit the background color part because the function wouldn't work at all.
That means, SetCtlColors has a bug that you can't use an "" parameter for the background color or ommit it to use the default background color.
Afrow UK
28th December 2005 18:09 UTC
I've already said this in a topic long ago when SetCtlColors was introduced but I don't think it was fixed.
-Stu
deguix
28th December 2005 18:11 UTC
I've found a workaround:
SetCtlColors $1 /BRANDING 0x049564
Using /BRANDING the color is set correctly.
Ender7584
28th December 2005 21:03 UTC
Excellent, that works perfectly.
Thank you Deguix! :)