Archive: Colour of combobox on directory page


Colour of combobox on components page
Hi!

Having never been one to leave things alone, I'm in the process of forcing the colours of every single control in my installer. On the components page, for instance, I do this:


; Change the text and background colours of all controls on the page
FindWindow $0 "#32770" "" $HWNDPARENT
SetCtlColors $0 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1006 ; Static text
SetCtlColors $1 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1021 ; "Select the installation type" static text
SetCtlColors $1 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1017 ; Installation type combobox control
SetCtlColors $1 ${BLACK} ${WHITE}
GetDlgItem $1 $0 1022 ; "Select the components" static text
SetCtlColors $1 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1032 ; Components treeview control
SendMessage $1 ${TVM_SETBKCOLOR} 0 ${WHITE}
SendMessage $1 ${TVM_SETTEXTCOLOR} 0 ${BLACK}
GetDlgItem $1 $0 1023 ; "Space required" static text
SetCtlColors $1 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1042 ; Description groupbox control
SetCtlColors $1 ${BLACK} ${GRAY}
GetDlgItem $1 $0 1043 ; Description static text
SetCtlColors $1 ${BLACK} ${GRAY}


Which works fine, but there are 2 things I don't know how to do. How would I change the colour of 1) the dropdown part of the combobox control (dialog id # 1017) and 2) the "Description" title of the groupbox control (dialog id # 1042)?

Any help would be greatly appreciated!

Thanks in advance,
Brad. :)

To set the color of the combo box drop down list, use the following.

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1017
SetCtlColors $1 00ff00 ff0000
System::Call '*(i 52, i, i, i, i, i, i, i, i, i, i, i, i 0) i .r0'
System::Call 'user32::GetComboBoxInfo(i r1, i r0)'
System::Call '*$0(i, i, i, i, i, i, i, i, i, i, i, i, i .r1)'
System::Free $0
SetCtlColors $1 00ff00 ff0000
As for the text color of the group box title, that only works when not using XP themes. See the following thread:

http://forums.winamp.com/showthread....color+groupbox

Thanks again, kichik! That did the trick!

Now all that's really left to do now are the colours of the buttons, and the inside background colours of the checkboxes (startmenu and finish pages), radio buttons (license page) and the progress bar.
I can see from previous posts that this is not possible to be done for the buttons, but how about the others? Can they be changed, at least for when not using XP themes?

Regards,

Brad.


All of those can only be changed with owner drawn controls. wansis does that, but it converts everything and not just your selection of controls. SkinnedButton can skin just buttons. You might be able to change both to skin exactly what you need but it'd require C code.