如果都可以,只可能是CRect类有这个重载!

解决方案 »

  1.   

    virtual int DrawText( LPCTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat );int DrawText( const CString& str, LPRECT lpRect, UINT nFormat );Return ValueThe height of the text if the function is successful.ParameterslpszStringPoints to the string to be drawn. If nCount is –1, the string must be null-terminated.nCountSpecifies the number of chars in the string. If nCount is –1, then lpszString is assumed to be a long pointer to a null-terminated string and DrawText computes the character count automatically.lpRectPoints to a RECT structure or CRect object that contains the rectangle (in logical coordinates) in which the text is to be formatted.str A CString object that contains the specified characters to be drawn.nFormatSpecifies the method of formatting the text. It can be any combination of the following values (combine using the bitwise OR operator): 
      

  2.   

    pDC->DrawText(str,rect,DT_SINGLELINE¦DT_LEFT);
    行吗?偶没试过,看msdn好像不行吧。