The idea here is pretty simple I thought, but i can't seem to figure it out. Essentially what i have is a MFC single view application with just one rich edit control 2.0 and some text in it. Let just say this control says "Please click here to fast forward."
CHARFORMAT cf = { sizeof(cf) };
cf.dwEffects = CFM_BOLD;
cf.dwMask = CFM_BOLD;
m_pMessageTextBox.SetSel(13, 17);
m_pMessageTextBox.SetSelectionCharFormat(cf);
Now this snippet of code i have just bolds the word "here" which is what i want. But in addition to bolding it, i want to change the color of the entire text to red.
I only need to see how you would turn text in a rich edit control 2.0 to a different color. I have browsed stackoverflow and google and a lot of the documents regarding this is from 10 years ago+.
Here is a recent question asked that asks the same question i do except his post is a gigantic snippet of code that i really don't care for. I've already tried using
cf.crTextColor = RGB(255,0,0);
before using
m_pMessageTextBox.SetSelectionCharFormat(cf);
nothing changes, i thought in this case the bold word would be bold AND red at the same time but it just stays black.