SetTextAlign

The SetTextAlign function sets the text align.

SetTextAlign sHorizontal, sVertical

Parameters

nHorizontal
This string affects horizontal alignment. It can be one of the following strings:
StringMeaning
"TA_LEFT" The reference point will be on the left edge of the bounding rectangle.
"TA_CENTER" The reference point will be aligned horizontally with the center of the bounding rectangle.
"TA_RIGHT" The reference point will be on the right edge of the bounding rectangle.

nVertical
This string affects vertical alignment. It can be one of the following strings:
StringMeaning
"TA_TOP" The reference point will be on the top edge of the bounding rectangle.
"TA_BASELINE" The reference point will be on the base line of the text.
"TA_BOTTOM" The reference point will be on the bottom edge of the bounding rectangle.

Remarks

The reference point is the point passed to a text output function

See too

TextOut

Example
See SetBkMode