[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SetTextAlign( hDC, nAlignMode )-> <nOldAlign>
------------------------------------------------------------------------------
PARAMETER:
<hDC> handle that identifies a device context
<nAlignMode> Is a numeric value determining the align mode flags. This
flags specify the relationship between a point and a
rectangle that bounds the text. The point can be either the
current position or coordinates specified by a text-output
function (such as ExtTextOut). The rectangle that bounds
the text is defined by the adjacent character cells in the
text string.
Choose only one flag from each category. The first category
affects text alignment in the x-direction:
TA_CENTER Aligns the point with the horizontal center of
the bounding rectangle.
TA_LEFT Aligns the point with the left side of the
bounding rectangle. This is the default setting
TA_RIGHT Aligns the point with the right side of the
bounding rectangle.
The second category affects text alignment in the y-direction
TA_BASELINE Aligns the point with the base line of the
chosen font.
TA_BOTTOM Aligns the point with the bottom of the
bounding rectangle.
TA_TOP Aligns the point with the top of the bounding
rectangle. This is the default setting.
The third category determines whether the current position
is updated when text is written:
TA_NOUPDATECP Does not update the current position after
each call to a text-output function. This is
the default setting.
TA_UPDATECP Updates the current x-position after each
call to a text-output function. The new
position is at the right side of the bounding
rectangle for the text. When this flag is set,
the coordinates specified in calls to the
TextOut function are ignored.
RETURNS:
<nOldAlign> is the previous text-alignment settings, if the function is
successful.
DESCRIPTION:
The SetTextAlign function sets the text-alignment flags for the given
device context. This align flags are used by TextOut() and ExtTextOut()
functions.
SOURCE:
SOURCE\WINAPI\TEXT.C
See Also:
ExtTextOut
TextOut
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson