CDC::DrawText

This method formats text inside the specified rectangle.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

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

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 members of the RECT structure you pass in the lpRect parameter.

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 method. In Windows CE, this method never updates the current text position.

See Also

CDC::SetTextColor, CDC::ExtTextOut