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?
I thought the code would do the right thing as I expected, but nothing happens, it's really awful!