Microsoft DirectX 8.0 (Visual Basic) |
Draws formatted text on a Microsoft® Direct3D® device.
object.DrawTextW( _ Text As String, _ Count As Long, _ DestRECT As RECT, _ Format As Long, _ Color As Long) As Long
If the method fails, an error is raised and Err.Number can be set to one of the following values.
D3DERR_INVALIDCALL |
D3DERR_NOTAVAILABLE |
D3DERR_OUTOFVIDEOMEMORY |
E_OUTOFMEMORY |
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
The DrawTextW method uses the device context's selected font, text color, and background color to draw the text. Unless the DT_NOCLIP format is used, DrawText 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, the DrawTextW method does not attempt to substitute a smaller font.
The DrawTextW method supports only fonts whose escapement and orientation are both zero.