Thanks for your good words. Your question is rather general but generally

speaking, you need an image list to hold the icons and use the ImageList_... API funtions to draw and LineTo API to draw the lines
Will you create a custom control from scratch or base it on Edit or RichEdit Windows controls? I definately propose the former method.
Why don't you use HiEdit in your applications?
I hope it helps,
Regards,
Antonis