Begin Result := Flags; { do not change center alignment } If UseRightToLeftAlignment Then If Result And DT_RIGHT = DT_RIGHT Then Result := Result And Not DT_RIGHT { removing DT_RIGHT, makes it DT_LEFT } Else If Not (Result And DT_CENTER = DT_CENTER) Then Result := Result Or DT_RIGHT; Result := Result Or DrawTextBiDiModeFlagsReadingOnly; End;