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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I change the background color of a List box control?

Status
Not open for further replies.

Sedai

Programmer
Mar 4, 2001
158
US
I don't like the default(?) white background color of the list box control. Is there a way to change it?
Preferrably, to make it the same color as the color of the dialog box. (I'd like to achive the same effect as when you make an edit box control read-only).
Thanks. Avendeval


 
Create your own class that inherits from CListBox then override the DrawItem method.
Look at CListBox::DrawItem in MSDN for more info.
 
DONT FORGET: set the properties of the list box to user draw or the OnDraw method will not get called.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top