[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Color Items in a Combo Box

Posted on 2008-02-11
2
Medium Priority
?
227 Views
Last Modified: 2013-11-20
Hi

What is the easiest way to get a combo box (in MFC) to change the colour of certain items in a combo box. For example, suppose there are three items in the combo: A, B and C. I want A to be red, B to be green and C to be blue. I may also want to change these colours at runtime.

What is the best way to do this?

Thanks in advance

John
0
Comment
Question by:IssacJones
  • 2
2 Comments
 
LVL 19

Expert Comment

by:alb66
ID: 20865675
You need an owner draw combo box.

See this article:
http://www.codeproject.com/KB/combobox/colorpicker.aspx
0
 
LVL 19

Accepted Solution

by:
alb66 earned 500 total points
ID: 20865693
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question