CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    CRichEditCtrl always scrolling to bottom when inserting text ?

    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


  2. #2
    Guest

    Re: CRichEditCtrl always scrolling to bottom when inserting text ?

    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
    [email protected]



  3. #3
    Guest

    Re: CRichEditCtrl always scrolling to bottom when inserting text ?

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured