Change color of text in a ListView control? 
Author Message
 Change color of text in a ListView control?

Is there a way to change the text color of a listview control?


Thu, 15 Aug 2002 03:00:00 GMT  
 Change color of text in a ListView control?
If you want all text to be of same color, handle WM_CTLCOLOR (OnCtlColor).
If you want each item to have different color, handle NM_CUSTOMDRAW.

I think there are examples in list control section of
codeguru.developer.com.

--
Ajay Kalra

Microsoft VC++/MFC MVP

Note: Please post all replies to newsgroup only.


Quote:
> Is there a way to change the text color of a listview control?



Thu, 15 Aug 2002 03:00:00 GMT  
 Change color of text in a ListView control?
In addition to the codeguru, there is a cute example of using color in
my MVP Tips site, in the CListBox I use for an error logging
mechanism. I use virtual methods to get the correct color.
                        joe


Quote:
>If you want all text to be of same color, handle WM_CTLCOLOR (OnCtlColor).
>If you want each item to have different color, handle NM_CUSTOMDRAW.

>I think there are examples in list control section of
>codeguru.developer.com.

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Sat, 17 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help changing text color in a ListView control

2. Changing text color in listview

3. How to change color of text static control

4. Changing Color of Static Text and other controls?

5. Changing Text Color in Rich Edit Control

6. Question on changing text color in CEdit Control

7. Changing text color of cells in the MS Grid control in C++

8. changing the font color of a static text control

9. Changing the background color of a static text control

10. Changing text color of cells in the MS Grid control

11. Change text color in Microsoft RichText ActiveX control

12. Change colors in static text control

 

 
Powered by phpBB® Forum Software