EDIT控件中的滚动条如何设置成垂直滚动时,滚动条总是在上方,新增的文字无法看到。
如何使滚动条的位置在下方,可以看到新增的文字?

解决方案 »

  1.   

    Add Edit control style:
    WS_VSCROLL | ES_MULTILINEint nFirstVisible = pmyEdit->GetFirstVisibleLine();// Scroll the edit control so that the first visible line
    // is the first line of text.
    if (nFirstVisible > 0)
    {
       pmyEdit->LineScroll(-nFirstVisible, 0);
    }
      

  2.   

    最简单的方法:在edit控件的属性中,style页面的左下方,选中multiline
    复选框,然后据需要选中verticle scroll和autoVscroll
      

  3.   

    自己建一个MYEDIT,从CEDIT派生
    在视图中调用
    m_pTextEdit->Create(WS_HSCROLL|ES_MULTILINE|ES_AUTOVSCROLL |ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, CRect(point1, point2),pView, 1);
    如有需要给我邮箱,有相关的代码
    顺便去我的问题看看
    http://expert.csdn.net/Expert/topic/2357/2357642.xml?temp=.86224
      

  4.   

    Create可以产生需要的EDIT控件么?
      

  5.   

    我解决了 richeditctrl中的问题 edt应该是一样的处理在OnInitDialog m_redtHistory.HideSelection(FALSE,TRUE); 在输入时候 m_redtHistory.SetSel(m_strHistory.GetLength(),m_strHistory.GetLength());
      

  6.   

    为什么在对话框上添加CRichEditCntrItem控件时,对话框无法启动呢?
    似乎闪了一下。