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?
A:
It's been a while since I've use the win32 API directly, but I believe that if you handle the WM_ERASEBACKGROUND message for your control, you can use FillRect() in your handler to paint the background using whatever color you like.
Ferruccio
2008-09-05 11:29:33
+2
A:
Have a look at the following macros:
ChrisN
2008-09-05 11:38:06
+2
A:
There are also appropriate methods of the CListViewCtrl
and CTreeViewCtrl
wrapper classes:
- GetBkColor
- SetBkColor
macbirdie
2008-09-08 07:03:18