How to draw a addition line in MFC TreeControl?

67 views Asked by At

As this picture show:

enter image description here

The blue line is what I want. However, I can't find anything about it on the Internet. All I know is that create a class inherited TreeControl, by doing so, it become dragable.

1

There are 1 answers

3
Vlad Feinstein On

You are looking for an owner-drawn control.

Here is one example: https://www.codeproject.com/Articles/19900/CRHTree-An-Owner-drawn-CTreeCtrl-that-has-Open-Clo

Yours going to be more complicated, as you would need to know that some of the items are not only source and destination of those arrows, but also may be a pass-through. Are you planning to adjust how far right the line is drawn based on the text of all visible items in between? And change it when user expands / collapses them?