Available in the LEADTOOLS Imaging toolkit. |
TextWordWrap example for C++ 4.0 and later
This example wraps text inside the rectangle that is specified for the text object.
// Text location
m_Lead1.SetTextTop(10);
m_Lead1.SetTextLeft(10);
m_Lead1.SetTextWidth(150);
m_Lead1.SetTextHeight(150);
// Text alignment and angle
m_Lead1.SetTextAlign(EFX_TEXTALIGN_LEFT_VCENTER);
m_Lead1.SetTextAngle(0);
// Enable word wrap
m_Lead1.SetTextWordWrap(TRUE);
m_Lead1.DrawText("LEADTOOLS 14 Supports WordWrap when drawing text.", NULL);