|
-
July 6th, 2010, 06:30 AM
#1
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!
-
July 6th, 2010, 07:44 AM
#2
Re: How to set richedit ctrl full line's background color?
You don't want to set the entire background right?
-
July 6th, 2010, 10:33 PM
#3
Re: How to set richedit ctrl full line's background color?
 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!
I thought the code would do the right thing as I expected, but nothing happens, it's really awful!
-
July 9th, 2010, 03:01 AM
#4
Re: How to set richedit ctrl full line's background color?
So maybe richedit control can't do that?
I thought the code would do the right thing as I expected, but nothing happens, it's really awful!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|