1

I know how to change the background on a single row in a TRichEdit control. But because this is applied to the selected text only, I can't set the background color of the whole line (client left to client right), only to the text part.

I tried to use the WM_ERASEBKGND message, but it doesn't work because a RichEdit control is painting the background in its WM_PAINT handler.

I also tried to set the brush to bsClear before calling the WM_PAINT handler, but it didn't work either.

Is it possible at all to have a custom drawn background?

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Max Kielland
  • 5,627
  • 9
  • 60
  • 95

1 Answers1

0

You'll be able to do so by using the EM_SETBKGNDCOLOR message.

Vinzenz
  • 2,749
  • 17
  • 23
  • No, this sets the whole control's background. I want to set the background of a single line from client left to client right. – Max Kielland Jan 13 '14 at 13:27