Click to See Complete Forum and Search --> : Owner Draw Fixed ListCtrl


Steve McNeese
April 9th, 1999, 01:13 PM
Is there a way to change the text color and background color of a listctrl in report mode for individual rows. The SetTextColor() method changes the whole control. There is an example of the background color for individual rows that build on the highlighting of the entire row article, but in VC6.0 the highlight entire row article is obsolete with the LVS_EX_FULLROWSELECT). I was wondering if the only way to change the background color or text color of individual rows is to override the DrawItem() method. If it is, can you do that without derriving a new class from CListCtrl?

Thanks,

Steve

Steven M. McNeese
steven.mcneese@boeing.com

anuvk
April 9th, 1999, 11:22 PM
Buddy,
I havent looked into the CUSTOMDRAW of ListCtrl but with the older controls such as
buttons,listboxes etc. the thing is that u need
not derive any class from CButton or CListBox.
Just in the *.rc specify as OWNER_DRAW and
handle the messages DRAWITEM and MEASSUREITEM in the parent window proc