Click to See Complete Forum and Search --> : Set different color for different columns
Jonathan
May 21st, 1999, 03:12 AM
I would like to set the color of the CListCtrl column text to different colors.
As SetTextColor(blue) will set the entire CListCtrl to blue.(Not the specific column that I want.)
To summarize of what I want...
Column1 Column2 Column3
White Blue Red
Blue Blue Green
Please help.....
Jörg Eckart
May 21st, 1999, 05:39 AM
Hi,
if you want to set column or row specific colors you have to use the style LVS_OWNERDRAWFIXED. The overridden member function DrawItem is then called for each item in the list control to be drawn. This member function has to do all the drawings and text printings so you can set the colors you want.
Greetings, Jörg
Jonathan
May 23rd, 1999, 10:54 PM
Do you have a example code for that purpose?
Thanks.
Jim Watters
May 25th, 1999, 05:55 PM
see
http://www.codeguru.net/bbs/wt/showpost.pl?Board=vc&Number=12340&page=0&view=collapsed&sb=5#Post12340
Jonathan
May 26th, 1999, 12:09 AM
I have got it up already actually. but thanks anyway.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.