Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Customising CtreeCtrl

3 views
Skip to first unread message

shubhishubhi

unread,
Jan 4, 2010, 9:18:01 AM1/4/10
to
Hello Guys,

I am working on a simple program where I want a CTreeCtrl with lines,
checkboxes, imagelists and background color for each item.

I am not sure how to add background color for the items so that each item
can have custom back color.

Suggesstions are welcome.

Cheers

Goran

unread,
Jan 4, 2010, 9:40:00 AM1/4/10
to
On Jan 4, 3:18 pm, shubhishubhi

Look for such a control on the internet. I'm pretty sure that somebody
already made a control with a custom-drawn background color and lines
and checkboxes are already available as styles. Image list
manipulation is orthogonal and you should have all you need in
CImageList class.

If you have to do it yourself (I think that you don't), off the top of
my head, try overriding NM_CUSTOMDRAW notification and acting when
dwDrawStage==CDDS_ITEMPOSTERASE.

Goran.

Seetharam

unread,
Jan 4, 2010, 10:18:21 AM1/4/10
to
Best place to find such samples:

http://www.codeproject.com/KB/tree/

-Seetharam

0 new messages