Individual rows Clistctrl background color


Hi all,

Visual studio 2008
OS: XP
C++ MFC.

I'm trying while focusing an item from my clistctrl search in the whole list if there are items related to that item and highlight them.

Basically right now I'm stuck on how to change their background color without painting the whole clist.

so for example
A:{C,D} C and D are related to A

If we have this items in the CListctrl the result should be like this:

A:Focused
B:common background color
C:Different background color (Same Bkg colour than D)
D:Different background color (same Bkg colour than C)
E: common background color
...

Im not really an expert with MFC so any help will be appreciated.
So if there is a easy way to do it or whatever helps it would be great.

NMLVCUSTOMDRAW im gonna try to use that but the example i found.. was for
coloured text so i hope there is no problem with that.

Thanks in advance

Regards
By the way is a CListctrl report view
Anyone knows how to do it and give me some guidelines? thanks


regards
Have you tried the codeguru or the codeproject websites?
Thanks, at the end with customdraw I was able to do it

Regards
Topic archived. No new replies allowed.