Set View Position in CEditView :: MFC

This is a discussion on Set View Position in CEditView :: MFC within the Windows Programming forums, part of the Platform Specific Boards category; Hi. I have an interesting problem. I am working on a program with with a CEditView window. I use GetEditCtrl().SetWindowsText ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Set View Position in CEditView :: MFC

    Hi.

    I have an interesting problem. I am working on a program with with a CEditView window. I use GetEditCtrl().SetWindowsText to update the view with new text. Whenever I call SetWIndowsText, the CEditView repaint the entire view, but it always resets the scroll position. For example, let say I am view line 200. (line 200 is at top of view). Whenever I update the view, CEditView resets the current view to line 0.

    Is there a way to set what line should CEditView beginning?

    Thanks,
    Kuphryn

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. The solution is to use LineScroll().

    A special thanks to Scott McPhillips of MSDN newsgroup for the solution.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Phoenix VC++ MFC Contract Position
    By Bill Law in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 08-13-2007, 09:17 PM
  2. CEditView Background Color & Font Color :: MFC
    By kuphryn in forum Windows Programming
    Replies: 5
    Last Post: 05-30-2002, 10:44 AM
  3. Setting Permanent Margins CEditView :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 05-04-2002, 05:15 PM
  4. Restoring View Size in Split Views :: MFC
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 05-02-2002, 09:44 AM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21