CDC::GetTextAlign 

UINT GetTextAlign( ) const;

Return Value

The status of the text-alignment flags. The return value is one or more of the following values:

Remarks

Retrieves the status of the text-alignment flags for the device context.

The text-alignment flags determine how the TextOut and ExtTextOut member functions align a string of text in relation to the string’s starting point. The text-alignment flags are not necessarily single-bit flags and may be equal to 0. To test whether a flag is set, an application should follow these steps:

  1. Apply the bitwise OR operator to the flag and its related flags, grouped as follows:
    • TA_LEFT, TA_CENTER, and TA_RIGHT

    • TA_BASELINE, TA_BOTTOM, and TA_TOP

    • TA_NOUPDATECP and TA_UPDATECP
  2. Apply the bitwise-AND operator to the result and the return value of GetTextAlign.

  3. Test for the equality of this result and the flag.

CDC OverviewClass MembersHierarchy Chart

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