Click to See Complete Forum and Search --> : CRichEditCtrl always scrolling to bottom when inserting text ?


April 15th, 1999, 11:16 AM
Hello everyone,

I'm using a CRichEditCtrl in a chat-like application. When new text is inserted in the control (using ReplaceSel), the control automatically scrolls down to its bottom. This is very annoying for the user, since it's impossible to read the contents of the control. So, is there a way to force a CRichEditCtrl not to scroll down automatically ?

Any help would be greatly appreciated,

Raphael Fleury

April 15th, 1999, 11:23 AM
I am using a CRichEditCtrl as a message output control, and I have exactly the opposite problem: When I add new text, it does never scroll in any way. So you can never read the latest message as it is far below the top of the text (which is displayed) until I manually call "LineScroll" after each text insertion.
So I wonder why it does scroll in your application?! Did you try to de-select automatic vertical scrolling? (Although this flag seems to have no effect in my program)

Jens
lenge@hft.e-technik.uni-dortmund.de

April 15th, 1999, 11:30 AM
I have a program that uses RichEdit controls, and here are my observations: When using a CRichEditCtrl object, you need to do the scrolling yourself, using linescroll(). On the other hand, when using CRichEditView, it automatically does the scrolling for you. Note that the CRichEditView is tied to the doc/view architecture, and you cannot use more than 1 CRichEditView in an application. Hope that helps.

-Matt