CDC::DrawText

This member function formats text inside the specified rectangle.

Syntax

virtual int DrawText ( LPCTSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

Windows CE 1.0 does not support the DT_EXTERNALLEADING flag in the nFormat parameter.

In Windows CE 1.0, when you specify DT_CALCRECT in the nFormat parameter, CDC::DrawText automatically calculates both the right and bottom fields of the RECT structure you pass in the lpRect parameter.

Note In Windows 95 and Windows NT, you can cause CDC::DrawText to update the current text position by first calling CDC::SetTextAlign with the TA_UPDATECP flag set, but Windows CE does not support the CDC::SetTextAlign member function. In Windows CE, this function never updates the current text position.

See Also

CDC Overview, CDC Member Functions, Graphical Drawing Classes, CDC::SetTextColor, CDC::ExtTextOut