Discussion:
Get a ListView cell's text color ?
(too old to reply)
Jean-Christophe
2014-01-17 18:02:51 UTC
Permalink
Hi All,

I want to retreive the color of the text displayed in a cell
of a ListView (where different cells have different text colors)

I tried to use this :
COLORREF ListView_GetTextColor( HWND hwnd );
but it doesn't work since I need to get the
text color of a particular cell of the list.

How can I do that ?
Deanna Earley
2014-01-20 09:44:10 UTC
Permalink
Post by Jean-Christophe
Hi All,
I want to retreive the color of the text displayed in a cell of a
ListView (where different cells have different text colors)
I tried to use this : COLORREF ListView_GetTextColor( HWND hwnd );
but it doesn't work since I need to get the text color of a particular
cell of the list.
How can I do that ?
Please don't multipost.
Post by Jean-Christophe
You can't easily.
The colour is set each time it's painted by asking the parent window
(with the CDDS_ITEMPREPAINT notification and NMLVCUSTOMDRAW
structure).
There is no (internal to the control) persistent colour information.
If it's your own control, you'll need to ask the code that's setting the colour.
--
Deanna Earley (***@icode.co.uk)
iCatcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored. Please reply to the
group.)
Loading...