Click here to Skip to main content
13,255,340 members (47,852 online)
Rate this:
Please Sign up or sign in to 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.


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 28-Nov-12 4:39am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100