CListrCtrl & Change Color and/or Font :: MFC 
Author Message
 CListrCtrl & Change Color and/or Font :: MFC

Hi.

I would like to know how to change the color and/or font
of a CListCtrl box item. For example, let say you have
the following listbox.

// Column header
Cars Year

// Column item
X 0
Y 1
Z 2
.....

I would like to make row 0 have yellow text and display
font "blah."
I would like to make row 1 have green text and display
font "blah2."

Thanks,
Kuphryn



Thu, 10 Feb 2005 17:46:55 GMT  
 CListrCtrl & Change Color and/or Font :: MFC

Quote:
>I would like to know how to change the color and/or font
>of a CListCtrl box item.

Kuphryn,

I think the easiest way is to make use of NM_CUSTOMDRAW.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Thu, 10 Feb 2005 21:21:41 GMT  
 CListrCtrl & Change Color and/or Font :: MFC
Okay.  Thanks.

Kuphryn



Thu, 10 Feb 2005 23:42:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CEditView Background Color & Font Color :: MFC

2. Changing font & color of tree view Items

3. Changing font & color in edit control

4. How to change static text FONT & COLOR

5. Change TitleBar Color and Font with MFC under VisualC

6. Changing font & font size for CListView windows

7. Changing font color in a textBox control

8. How do I change font color

9. Changing the font, and color of controls.

10. Listbox: change font color

11. How to change the color,size,font of text in a dialog box

12. Changing font size and color on a dialog

 

 
Powered by phpBB® Forum Software