[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


How to change the color of text in a listbox

Posted on 1998-08-24
Medium Priority
Last Modified: 2010-04-10
How can i change the color of individual lines of text in a listbox
i'm using visual c++ 5
Thanx in aDvance
Question by:mwebster
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
LVL 23

Accepted Solution

chensu earned 200 total points
ID: 1171146
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, ...).

Author Comment

ID: 1171147
do you have any sample code for an owner drawn listbox
thanx again
LVL 23

Expert Comment

ID: 1171148
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 23

Expert Comment

ID: 1171149

Author Comment

ID: 1171150
thanx again but the second url does not exist and do you have anything in using visual c++.
LVL 23

Expert Comment

ID: 1171151
The second URL is correct. Try this

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

650 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