win32gui.DrawText

(int, PyRECT) = DrawText(hDC, String , nCount , Rect , Format )

Draws formatted text on a device context

Parameters

hDC : int/PyHANDLE

The device context on which to draw

String : str

The text to be drawn

nCount : int

The number of characters, use -1 for simple null-terminated string

Rect : PyRECT

Tuple of 4 ints specifying the position (left, top, right, bottom)

Format : int

Formatting flags, combination of win32con.DT_* values

Return Value

Returns the height of the drawn text, and the rectangle coordinates