Link to home
Start Free TrialLog in
Avatar of TSMITH
TSMITH

asked on

Edit control selection

How can I get the text that I select in a multi-line edit control to scroll into view.
I'm using SetSel

Cheers
ASKER CERTIFIED SOLUTION
Avatar of captainkirk
captainkirk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
m_MyEdit1.SendMessage(EM_SCROLLCARET);

This should do what you want.
Maybe I crazy, or just a little weird, but don't both of these two options do the same thing?
Avatar of TSMITH
TSMITH

ASKER

Yes, they do. Thanks poohbear 68, but I had to award the points to captainkirk as his/her comment was submitted first. Also captainkirk's solution is MFC rather than SDK.
Right.  No problem -- I fully understand.  So while we're at it anyhow, here's another way to do it!  :)  At least according to documentation, it works.   I guess I haven't tested it specifically.  <grin>

m_Edit.SetSel(m_Edit.GetSel(), FALSE);