CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2002
    Location
    Chennai
    Posts
    60

    Question CRichEditCtrl!!!!

    I am having a rich edit control with a horizontal and vertical scroll.When I am populating my RichEditCtrl with text , horizontal and vertical scrolls are not moving with respect to the text in RichEditCtrl.Y??
    Vidya.B

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    If you expect some answers, you will have to make some effort to be more specific. Is it CRichEditView’s control or you are referring to a control contained in dialog?

    How do you populate it? What styles control is created with?
    Post some relevant code or the whole project.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  3. #3
    Join Date
    Oct 2002
    Location
    Chennai
    Posts
    60

    Urgent

    Fine to be more specific..Take the case of Output Window in Microsoft VC++ Window..U are pospulating in the same style..As i keep on populating a script,the scroll bars should also scroll..But it is not scrolling...

    I am using SetSel() to set the selection within this CRichEditCtrl object. How do i scroll.Please help.
    Vidya.B

  4. #4
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    I am trying to help but you do not let me.
    I have asked some questions and I have gotten in return some general statements. I do not know (and neither do you) that you are updating your window in the same manner *** studio does.

    Please do at least part of what I have asked for to make my (and others) life easier. Otherwise do not expect intelligent answer.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  5. #5
    Join Date
    Oct 2002
    Location
    Chennai
    Posts
    60
    Ok..Hope i am irritating u..Sorry..

    The fact is..

    For example,say that u are compiling a script.U get some error messages .THose messages are populated inside the Output WIndow..

    With respect to my module ,I just get the Error string alone to be put inside the Output Window.Now i read the Error string and put into the Output Window..

    Say I am getting "Line No.5 :: Invalid Syntax".Now this is my input..Input may be one line or 2 lines......I do not know that.I just need to populate.That is all..

    I have made my Output WIndow with CRichEditCtrl.I have put a Horizontal and Vertical Scroll Bar by deriving from SECTabWnd.

    CAITOutputWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
    SECTabWnd m_childWnd;
    CRichEditCtrl m_wndRichEditCtrl;
    m_wndRichEditCtrl.Create(WS_CHILD | WS_VISIBLE | ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN, CRect(0,0,0,0), &m_childWnd, 3094);
    m_childWnd.SetScrollStyle(0, WS_HSCROLL | WS_VSCROLL);
    ..
    }

    with CAITOutputWnd derived from SECTabWnd.

    With respect to Error String I just do the following..

    CAITOutputWnd::OutputErrorString(CString r_strErrMsg)
    {
    CString l_strErrorMsg;
    CString l_strOutputMsg;
    long l_lErrLen =0;
    CHARRANGE cr;
    cr.cpMin = 0;
    cr.cpMax = -1;

    m_objedtOutput.SendMessage(EM_EXSETSEL, 0, (LPARAM) &cr);
    l_strErrorMsg = m_objedtOutput.GetSelText();
    if(m_objedtOutput.GetTextLength() == 0)
    l_strOutputMsg = r_strErrMsg;
    else
    l_strOutputMsg = l_strErrorMsg+ "\n"+ r_strErrMsg;
    m_objedtOutput.SetWindowText(l_strOutputMsg);
    }
    where r_strErrMsg is the Error String..

    If i am still irritating u sorry..
    Vidya.B

  6. #6
    Join Date
    Oct 2001
    Location
    lake of fire and brimstone
    Posts
    1,628
    You might want to use the LineScroll function, though I also still do not fully understand what you mean.

    m_wndRichEditCtrl.LineScroll(m_wndRichEditCtrl.GetLineCount());
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞
    ۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞۞

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