How to set richedit ctrl full line's background color?
I've googled to set the background color of the text using following code
Code:
CHARFORMAT2 cf;
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_BACKCOLOR;
cf.dwEffects = CFE_PROTECTED;
cf.crBackColor = m_crBkTwo;
m_edText.SendMessage(EM_SETCHARFORMAT, (WPARAM)SCF_SELECTION|SCF_WORD,
(LPARAM)&cf);
But the effect is just setting background color of inserting text, not full line,
Is there some way to set full line using the color?
Re: How to set richedit ctrl full line's background color?
You don't want to set the entire background right?
Re: How to set richedit ctrl full line's background color?
Quote:
Originally Posted by
pm44xl22
You don't want to set the entire background right?
Sorry for my late reply, timezone reason!
No, I don't want to set the entire background. I just want to set color in entire line only!
Re: How to set richedit ctrl full line's background color?
So maybe richedit control can't do that?