What would be the best way to do line numbering in a rich edit control? I tried to make a margin and then paint the line number in the margin but it resulted in the content of the edit control being erased. Is it possible to draw text in the margin or am I going about this the wrong way? Any hints would be appreciated.