CDC::DrawTextEx
Visual Studio 2012
Formats text in the given rectangle.
virtual int DrawTextEx( LPTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat, LPDRAWTEXTPARAMS lpDTParams ); int DrawTextEx( const CString& str, LPRECT lpRect, UINT nFormat, LPDRAWTEXTPARAMS lpDTParams );
It formats text by expanding tabs into appropriate spaces, aligning text to the left, right, or center of the given rectangle, and breaking text into lines that fit within the given rectangle. The type of formatting is specified by nFormat and lpDTParams. For more information, see CDC::DrawText and DrawTextEx in the Windows SDK.
The text color may be set by CDC::SetTextColor.
Note