Archive: SetCtlColors on 1006 (detailprint)


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


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:


Sorry

forgot to include my personal plugin... I'm like a n00b :tinfoil:


There's no need for a plug-in or SetCtlColors. Use InstallColors.


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

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

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


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


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 :)


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?


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:

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


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.


I've already said this in a topic long ago when SetCtlColors was introduced but I don't think it was fixed.

-Stu


I've found a workaround:


SetCtlColors $1 /BRANDING 0x049564


Using /BRANDING the color is set correctly.

Excellent, that works perfectly.

Thank you Deguix! :)