Function Reference


Calculates the size and location of the specified text when rendered in the visual style font

#include <WinAPITheme.au3>
_WinAPI_GetThemeTextExtent ( $hTheme, $iPartID, $iStateID, $hDC, $sText, $tRECT, $iFlags )


$hTheme Handle to a window's specified theme data.
$iPartID The part in which the text will be drawn.
$iStateID The state of the part.
$hDC Handle to the device context to select the font into.
$sText The string that contains the text to draw.
$tRECT $tagRECT structure that contains the rectangle used to control layout of the text. This parameter may be set to 0.
$iFlags The string's formatting flags ($DT_*).

Return Value

Success: $tagRECT structure that contains, in logical coordinates, the rectangle required to fit the rendered text.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

See Also

Search GetThemeTextExtent in MSDN Library.