Want to draw extra lines when slelected

I have built a Bezier curve tool and stroke.

It works fine with one problem. Beziers are drawn with 4 points. 2 of those points are the begin and End points. The other two are called control handles. They affect the amount of curve that takes place on the end points.
So typically, these two control points are hidden unless the curve is selected. Then applications usually draw a line from the end point to the control point. This is the "pen" tool that is used in some applications.
Right now, all four points show when the curve is selected, but I need to draw those two lines from end point to control point while the curve is selected.
Is there a way to do this?
Thanks!
Bob

Try http://www.nwoods.com/forum/uploads/GuidedBezierStroke.cs.

Caveat: the code assumes a simple Bezier stroke, not a polyBezier, where there are 3n+1 points for n>1.

Thank you Walter.

You guys rock!
Bob
PS: this shows some things that were not apparent to me... Thanks again! This will save me a bunch of work.

Out of curiosity, what things were not apparent to you? I’m wondering what we should document better, and how.

Perhaps that when one overrides Paint to draw outside of the Bounds of the object, you also need to override ExpandPaintBounds?
This is documented with the Paint method, and demonstrated in many example classes. But maybe we could make it clearer.
Or perhaps that because selection handles, since they are GoObjects too, only invalidate their own bounds when they are created or removed. Since we also drawing those guide lines at the same time as when selection handles exist, we need to invalidate those areas too, and the easiest way to do that is to invalidate the whole stroke's expanded paint area.
This too is mentioned in the documentation for GoObject.Paint, but is harder to explain. I myself had to get it right by trial and error, even though of course I had the advantage in that I knew I needed to call InvalidateViews at the right times -- including before calling the base method for OnLostSelection.
Since selection handles are per-view, it would be quite reasonable to invalidate just in that view, rather than calling GoObject.InvalidateViews() which invalidates the object's expanded paint bounds in all views displaying that document. However that optimization wasn't worth coding.