i need to implement the functionality of EM_SETCUEBANNER, where a text hint appears inside an Edit control:
And I also need to find a way to display the caret in the control, since I haven't found a way to allow Windows to do that for me without also painting the white bar I mentioned.
If you want to handle WM_PAINT by yourself without forwarding the message to the original windowproc of your superclass, you should not forget to call DefWindowProc. So that the caret will be drawn. To avoid the white bar you should remove class brush with SetClassLongPtr. And somehow keep your DC's clipping region to clip Edit controt's ExtTextOut outputs. The white bar may be the result of OPAQUE option passed to ExtTextOut by Edit control.
Conclusion: Write your own control. No pain, no gain.