Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
createwindow("listbox", ~~)
it's gonna show a listbox with several lists that I store.
Assuming that there are below lists in listbox.

Kyle
Jane
Kate

what I want to do is to change name color only for Jane. generally it's black.
and is it possible that I can put data in specific line such as second line or seventh line skipping blank lines.
Please, give your advice
Posted

1 solution

Yes, possible by using an ownerdrawn CListBox.

You need to use the LBS_OWNERDRAWVARIABLE (or LBS_OWNERDRAWFIXED ) and other owner drawn related flags when creating the control, and after than you have to handle the DrawItem and MeasureItem stuff.

I don't know how that works exacly in straight Win32, but I think it's a good start.

Max.
 
Share this answer
 
Comments
Richard MacCutchan 28-Nov-12 11:30am    
Yes, it is a good start.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900