List Box

W

wayne

Hi,

May i know if we are able to change the text color of the List Box? For
example, i have 10 items in the List Box. By default, the words are
black in color. Is there anyway i can change 1 or 2 items to another
color, while the rest remain as black?


thanks alot
wayne
 
D

David Lowndes

May i know if we are able to change the text color of the List Box? For
example, i have 10 items in the List Box. By default, the words are
black in color. Is there anyway i can change 1 or 2 items to another
color, while the rest remain as black?

Wayne,

You will need to make the control use the owner drawn style and add
handlers for the WM_MEASUREITEM & WM_DRAWITEM messages.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top