Browse - Programming Tips - How do I right align text with GDI+?

Date: 2015apr27
OS: Windows
Product: GDI+
Language: C++

Q.  How do I right align text with GDI+?

A.  Use StringAlignmentFar.
(To left align use StringAlignmentNear.)

I suppose they use near/far to handle languages which read the opposite
direction to English.

StringFormat format; format.SetAlignment(StringAlignmentFar); graphics.DrawString( ..., ..., ..., ..., &format, ...);