解决方案 »

  1.   

    BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs)
    {
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs BOOL bPreCreated = CRichEditView::PreCreateWindow(cs); cs.style = AFX_WS_DEFAULT_VIEW | WS_VSCROLL | ES_AUTOHSCROLL |
    ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY; return bPreCreated;
    }
      

  2.   

    ctrEdit.SetReadOnly(1);肯定可以。
      

  3.   

    CRichEditCtrl& ctl = GetRichEditCtrl();
    ctl.SetReadOnly(TRUE);就OK了。
      

  4.   

    void CMyView::OnInitialUpdate()
    {
        GetRichEditCtrl().SetReadOnly();