Discussion:
Text color in ListView control.
(too old to reply)
John
2010-12-06 08:52:42 UTC
Permalink
Hi all,

I have a ListView control with several columns and lines,
default colors are black text on white background and I
want to change text and/or background color of a given cell.
I tried ListView_SetTextColor() and ListView_SetTextBkColor()
but they set the color of the whole list.

How can I set the foreground/background color of a single cell ?

TIA
David Lowndes
2010-12-06 09:42:20 UTC
Permalink
Post by John
I have a ListView control with several columns and lines,
default colors are black text on white background and I
want to change text and/or background color of a given cell.
I tried ListView_SetTextColor() and ListView_SetTextBkColor()
but they set the color of the whole list.
How can I set the foreground/background color of a single cell ?
You can use custom draw facilities - have a look on MSDN for the
"NM_CUSTOMDRAW (list view) Notification" topic for starters.

Dave
John
2010-12-06 10:37:05 UTC
Permalink
On Dec 6, 10:42 am, David Lowndes

|> >How can I set the foreground/background color of a single cell ?
Post by David Lowndes
You can use custom draw facilities - have a look on MSDN for the
"NM_CUSTOMDRAW (list view) Notification" topic for starters.
Thanks Dave !

Loading...