rsegal
30th April 2003 21:15 UTC
Background color for controls on custom pages
I want to be able to change the color used on specific controls in a custom dialog page I have. I would think you would be able to do this using some combination of GetDlgItem and SetBkColor however I'm not sure exactly how you do that. My main question is how can you get the HWND of controls in a custom dialog?
Joost Verburg
30th April 2003 21:20 UTC
For InstallOptions, the dialog item ID is 1200 + Field number - 1. More information about customizing IO control can be found in the Readme.
rsegal
30th April 2003 21:48 UTC
I forget the post I got this idea from but it is somewhere else in the forum messages. This works...
Push $R0
Push $R1
InstallOptions::initDialog $PLUGINSDIR\HardwareComparisonDialog.ini
Pop $R0
GetDlgItem $R1 $R0 1203 ;1200 + Field number - 1
;$R1 contains the HWND of the first field
SetBkColor $R1 0x00FF00
InstallOptions::show
Pop $R1
Pop $R1
Pop $R0
Thanks for the help Joost.
Joost Verburg
30th April 2003 22:24 UTC
That's an exact copy from the Readme. Check Contrib\InstallOptions\Readme.html for more info.
rsegal
1st May 2003 15:40 UTC
You're right it is an exact copy. Can't believe I missed that, aren't I quite the fool.
Thanks again Joost.