You can override Paint (WM_PAINT) event but it is complex because there are many messages to handle (mouse, keyboard, focus, ...)
A simpler way is to host a WPF TextBox with ElementHost Class
A quick test with 2 TextBoxes and SelectionBrush Property =>