Microsoft DirectX 8.1 (Visual Basic) |
Draws formatted text on a Microsoft® Direct3D® device.
object.DrawText( _ Text As String, _ Count As Long, _ DestRECT As RECT, _ Format As Long, _ Color As Long) As Long
If the function succeeds, the return value is the height of the text in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from lpRect->top to the bottom of the drawn text.
If the function fails, the return value is zero.
DrawText must be called inside a Direct3DDevice8.BeginScene/Direct3DDevice8.EndScene block.
This method uses the device context's selected font, text color, and background color to draw the text. Unless the DT_NOCLIP format is used, this method clips the text so that it does not appear outside the specified rectangle. All formatting is assumed to have multiple lines unless the DT_SINGLELINE format is specified.
If the selected font is too large for the rectangle, this method does not attempt to substitute a smaller font.
This method supports only fonts whose escapement and orientation are both zero.