-
text color in listbox
Hi,
May i know if we are able to change the text color of the List Box when the listbox is created using MFC Dialog Box? For example, i have 10 items in the List Box. By default, the words are black in color.
eg
1
2
3
4
5
6
7
8
9
10
Is there any ways i can change 1 or 2 items to another color, while the rest remain as black?
eg
1
2
3
4
5
6
7
8
9
10
thanks for the help....
wayne
-
Please don't cross-post.
If you haven't already done so then please take some time to familiarise yourself with the faq:
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Make sure you have a look at the the posting guidelines:
http://cboard.cprogramming.com/annou...ouncementid=51
Following the rules will ensure you get a prompt answer to your question.
Remember, too, that the board has a search facility, a link is at the top of your screen:
http://cboard.cprogramming.com/search.php
It will often get you a quicker answer to your questions than waiting for a response to one you have posted.
If you have any questions about this you may ask or you can contact one of our forum leaders:
http://cboard.cprogramming.com/showgroups.php
***
The answer given in your original thread is what you need, namely implementing an owner-drawn listbox. An example using mfc can be found here.