Jerry
Quick & Easy, moving the caret should do the trick. Or look around
here: <http://msdn.microsoft.com/en-us/library/68730ktd(VS.80).aspx>
Thanks
-Jerry
This code positions the caret and removes the highlight. You can experiment
with nChar - try setting it to 0 or -1.
void CViewRtf::PositionCaret (long nChar)
{
m_RichEditCtrl.SetSel (nChar, nChar);
}
-- David
You could use SetSel to do this. One misfeature of edit controls is a continuing Bad Idea
that setting the focus to a control should necessarily select all the text in the control;
this is different from adding text via some technique such as ReplaceSel. I once saw how
to disable this, but I've now forgotten.
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm