CDC::SetTextAlign

UINT SetTextAlign( UINT nFlags );

Return Value

The previous text-alignment setting, if successful. The low-order byte contains the horizontal setting and the high-order byte contains the vertical setting; otherwise 0.

Parameters

nFlags

Specifies text-alignment flags. The 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. The rectangle that bounds the text is defined by the adjacent character cells in the text string. The nFlags parameter can be one or more flags from the following three categories. Choose only one flag from each category. The first category affects text alignment in the x-direction:

Remarks

Sets the text-alignment flags.

The TextOut and ExtTextOut member functions use these flags when positioning a string of text on a display or device. The flags specify the relationship between a specific point and a rectangle that bounds the text. The coordinates of this point are passed as parameters to the TextOut member function. The rectangle that bounds the text is formed by the adjacent character cells in the text string.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::ExtTextOut, CDC::GetTextAlign, CDC::TabbedTextOut, CDC::TextOut, ::SetTextAlign