How to change the color of text in a listbox

How can i change the color of individual lines of text in a listbox
i'm using visual c++ 5
Thanx in aDvance
mwebsterAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
If you want all the text to be the same color, catch the WM_CTLCOLORLISTBOX message (or override CWnd::OnCtlColor for MFC). If you want each line to have different color, create an  owner-draw list box (override CListBox::OnDrawItem, ...).
0
 
mwebsterAuthor Commented:
do you have any sample code for an owner drawn listbox
thanx again
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
chensuCommented:
0
 
mwebsterAuthor Commented:
thanx again but the second url does not exist and do you have anything in using visual c++.
0
 
chensuCommented:
The second URL is correct. Try this
http://www.codeguru.com/show.cgi?controls=/controls/tab_checklistbox.shtml

Or go to http://www.codeguru.com, click "other controls" on the left navigation bar, there are some list box related articles.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.