StringTrimming enumeration (gdiplusenums.h)

The StringTrimming enumeration specifies how to trim characters from a string so that the string fits into a layout rectangle. The layout rectangle is used to position and size the display string.

Syntax

typedef enum StringTrimming {
  StringTrimmingNone = 0,
  StringTrimmingCharacter = 1,
  StringTrimmingWord = 2,
  StringTrimmingEllipsisCharacter = 3,
  StringTrimmingEllipsisWord = 4,
  StringTrimmingEllipsisPath = 5
} ;

Constants

 
StringTrimmingNone
Value: 0
Specifies that no trimming is done.
StringTrimmingCharacter
Value: 1
Specifies that the string is broken at the boundary of the last character that is inside the layout rectangle. This is the default.
StringTrimmingWord
Value: 2
Specifies that the string is broken at the boundary of the last word that is inside the layout rectangle.
StringTrimmingEllipsisCharacter
Value: 3
Specifies that the string is broken at the boundary of the last character that is inside the layout rectangle and an ellipsis (...) is inserted after the character.
StringTrimmingEllipsisWord
Value: 4
Specifies that the string is broken at the boundary of the last word that is inside the layout rectangle and an ellipsis (...) is inserted after the word.
StringTrimmingEllipsisPath
Value: 5
Specifies that the center is removed from the string and replaced by an ellipsis. The algorithm keeps as much of the last portion of the string as possible.

Remarks

Trimming affects only the last visible or partly visible (due to clipping) line of text.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header gdiplusenums.h (include Gdiplus.h)

See also

DrawString Methods

Formatting Text

MeasureString Methods

StringAlignment

StringDigitSubstitute

StringFormat::SetTrimming

StringFormatFlags