Changing the text Colour in a ListView Control ( Win32)

5k views Asked by At

I have a List View Control that I have created with Win32 C++
I am adding sub items using ListView_SetItem
This just Text and the List View is in Report Mode. I want to change the colour of the text for a particular sub Item . Can I do this? How
Thanks

2

There are 2 answers

4
David Heffernan On BEST ANSWER

You'll need to use owner-draw for this sub item so that it uses different font properties than the rest of the list view.

0
Rahul On

It turns out you can do it using NM_CUSTOMDRAW but then you need to do a bunch of other stuff too

This article explains it really well http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=2890&av=110402 look for the section called ListView Colors