Function Reference


Sets the text-alignment flags for the specified device context

#include <WinAPIGdi.au3>
_WinAPI_SetTextAlign ( $hDC [, $iMode = 0] )


$hDC Handle to the device context.
$iMode [optional] The text alignment by using a mask of the values in the following list. Only one flag can be chosen
from those that affect horizontal and vertical alignment. In addition, only one of the two flags that
alter the current position can be chosen.
$TA_TOP (Default)
$TA_LEFT (Default)

When the current font has a vertical default base line, as with Kanji, the following values must be
used instead of $TA_BASELINE and $TA_CENTER.

The default values are $TA_LEFT, $TA_TOP, and $TA_NOUPDATECP.

Return Value

Success: The previous text-alignment setting ($TA_* and $VTA_*).
Failure: (-1) GDI_ERROR.

See Also

Search SetTextAlign in MSDN Library.