CView并不能接受字符串,CEditView才可以。

解决方案 »

  1.   

    在OnDraw中pDC->TextOut或pDC->DrawText
      

  2.   

    SetWindowText(str)用来设置标题...
    想显示在是途中...
    在OnDraw()种:pDC->TextOut(x,y,str);
    x-------横坐标
    y-------纵坐标
    str-----你要显示的字符串
    其实这样就行pDC->TextOut(0,0,"I am a hero");
      

  3.   

    SetWindowText(...) 是设置窗口的标题栏的title;
    尽管View没有WS_CAPTION风格。输出文字使用textout.
    (CEditView中使用SetWindowText可以)
      

  4.   

    pDC->TextOutBOOL TextOut( int x, int y, const CString& str );Return ValueNonzero if the function is successful; otherwise 0.ParametersxSpecifies the logical x-coordinate of the starting point of the text.ySpecifies the logical y-coordinate of the starting point of the text.lpszStringPoints to the character string to be drawn.nCountSpecifies the number of bytes in the string.strA CString object that contains the characters to be drawn.
    在OnDraw中
    example:
    pDC->TextOut(10,100,"喂,给分了吧!");