Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest way to change listview and treeview colours

Tags:

c++

winapi

wtl

I'm trying to find a simple way to change the colour of the text and background in listview and treeview controls in WTL or plain Win32 code.

I really don't want to have to implement full owner drawing for these controls, simply change the colours used.

I want to make sure that the images are still drawn with proper transparency.

Any suggestions?

like image 998
Simon Steele Avatar asked Sep 05 '08 10:09

Simon Steele


1 Answers

Have a look at the following macros:

ListView_SetBkColor
ListView_SetTextColor

TreeView_SetBkColor
TreeView_SetTextColor

like image 132
ChrisN Avatar answered Sep 27 '22 21:09

ChrisN