我写的是view/doc的程序,view 继承的是CEditView,不知怎么在视类中写入文字。
响应OnDraw()无效。
谢谢!

解决方案 »

  1.   

    CEdit& theEdit = GetEditCtrl();
    theEdit.SetWindowText("This is the testing string!")//view里面的那个edit 将view的client全部覆盖了,所以你看不到你的东西!
      

  2.   

    消息响应函数里
    {
    CEdit& theEdit = GetEditCtrl();
    int length=theEdit.GetWindowTextLength();
    theEdit.SetSel(length,length);
    theEdit.ReplaceSel(yourtext);//CString yourtext;
    }
      

  3.   

    CEdit& theEdit = GetEditCtrl();
    int length=theEdit.GetWindowTextLength();
    theEdit.SetSel(length,length);
    theEdit.ReplaceSel(yourtext);//CString yourtext;
      

  4.   

    EditView中实际上是一个Edit Control,先获得控件
    CEdit edit = GetEditCtrl();
    然后再写字
    edit.SetWindowText(...);