Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set color in each item in CCombobox

Status
Not open for further replies.

Lorey

Programmer
Feb 16, 2003
88
0
0
SG
Please help.

Im populating the CCombox on OnInitDialog.
How to put color on each item text so when the user click the combobox, it will list the items in color (i.e. half of the list is red and half of the list is blue)


 
Just override the DrawItem function in a class derived from CComboBox (CColoredComboBox) then make all your coloured combos of this class.

HTH,

s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top