set text color for an item 
Author Message
 set text color for an item

Hello everyone! I need help on setting the text color for
an item (row) on a list view without doing owner-draw.
I need the same functionality as ListView::SetHotItem(),
but that's not a member of listView in Visual C++ 5. So
I can't use it. Any help would be greatly appreciated.
Thank you!

Quan



Sat, 10 Apr 2004 02:57:41 GMT  
 set text color for an item
You can use NM_CUSTOMDRAW to do this. Sample code is in MSDN as well as at
www.codeguru.com.

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> Hello everyone! I need help on setting the text color for
> an item (row) on a list view without doing owner-draw.
> I need the same functionality as ListView::SetHotItem(),
> but that's not a member of listView in Visual C++ 5. So
> I can't use it. Any help would be greatly appreciated.
> Thank you!

> Quan



Sat, 10 Apr 2004 03:02:28 GMT  
 set text color for an item
Hi,

To resolve this problem, please go to this link to download newer
comctrl32.dll from this link:

http://www.microsoft.com/msdownload/ieplatform/ie/comctrlx86.asp

and then use this Macro:

INT ListView_SetHotItem(  HWND hwndLV,INT  iIndex );

if you want to set the listview rows and cells color more flexibly and want
not use own-draw, the custom drawing method should meet your request:

http://www.codeguru.com/listview/CustomDrawListViewControls1.html
http://www.codeguru.com/listview/CustomDrawListViewControls2.html

Thanks,
Freist

P.S. This posting is provided "AS IS" with no warranties, and confers no
rights. You assume all risk for your use.  2001 Microsoft Corporatioin. All
rights reserved.



Sun, 11 Apr 2004 11:30:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Setting the background color of Static Text item and window

2. how set color of single Item Text in CTreeCtrl

3. set the text color and the background color of a Control Cbutton

4. set text color on static text

5. Setting CTreeCtrl item color ???

6. Set CTreeCtrl 's Item color

7. How to set listview items color

8. How to set the color of a single (Sub)item in a clistctrl

9. Set Item color in a CListCtrl Control

10. Setting CTreeCtrl item color ???

11. text color of list control items

12. CTreeCtrl and Colored Item Text

 

 
Powered by phpBB® Forum Software