virtual int DrawText( LPCTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat ); int DrawText( const CString& str, LPRECT lpRect, UINT nFormat );
Parameters lpszString Points to the string to be drawn. If nCount is –1, the string must be null-terminated.nCount Specifies 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.lpRect Points to a RECT structure or CRect object that contains the rectangle (in logical coordinates) in which the text is to be formatted.(可以指向rect 结构指针或者CRect 对象。)str A CString object that contains the specified characters to be drawn.nFormat Specifies the method of formatting the text. It can be any combination of the values described for the uFormat parameter in DrawText in the Platform SDK. (combine using the bitwise OR operator):
LPCTSTR lpszString,
int nCount,
LPRECT lpRect,
UINT nFormat
);
int DrawText(
const CString& str,
LPRECT lpRect,
UINT nFormat
);
Parameters
lpszString
Points to the string to be drawn. If nCount is –1, the string must be null-terminated.nCount
Specifies 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.lpRect
Points to a RECT structure or CRect object that contains the rectangle (in logical coordinates) in which the text is to be formatted.(可以指向rect 结构指针或者CRect 对象。)str
A CString object that contains the specified characters to be drawn.nFormat
Specifies the method of formatting the text. It can be any combination of the values described for the uFormat parameter in DrawText in the Platform SDK. (combine using the bitwise OR operator):
CRect::operator LPRECT