Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRichEditCtrl::LineScroll()

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I put a CRichEditCtrl object in my dialog and used its LineScroll() method to scroll both vertically and horizontally to display my selection. It did scroll vertically, but sadly it didn't scroll horizontally as expexcted.

The call is like:
((CRichEditCtrl*)GetDlgItem(IDC_RICHEDIT1))->LineScroll(10, 50);

In MSDN, it says if ES_RIGHT or ES_CENTER are specified, it does not scroll horizontally. However, I didn't specify them. The control was specified as left align.

What's the reason of it? How can I scroll the line horizontally?

Thanks.
 
Why not use member functions instead:
->SetSel( beg, end);
->HideSelection( FALSE, FALSE );
It scrolls automatically. Normally, I repeate these functions twice (sometimes it does not work with one call...).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top