IASLabel::get_Format

This method retrieves the text format of the label.

Syntax

HRESULT get_Format( UINT *pwFormat );

Parameters

pwFormat
[out] Pointer to the unsigned 16-bit value that contains text formatting. It is one of the following values:
ASFC_ALIGN_BOTTOM
When drawing text, align it with the bottom of the control.
ASFC_ALIGN_CENTER
When drawing text, center it.
ASFC_ALIGN_LEFT
When drawing text, align it to the left of the control.
ASFC_ALIGN_NOCLIP
Draw text without clipping it.
ASFC_ALIGN_RIGHT
When drawing text, align it to the right of the control.
ASFC_ALIGN_SINGLELINE
Draw text in a single line.
ASFC_ALIGN_TOP
When drawing text, align it with the top of the control.
ASFC_ALIGN_VCENTER
When drawing text, center it vertically.
ASFC_ALIGN_WORDBREAK
Draw text with word breaks.

Return Values

NOERROR indicates success. E_INVALIDARG indicates that the argument is invalid.

Remarks

By default, text wraps to the next line on a per-word basis. All carriage returns/line feeds (CR/LFs) are acknowledged. When the text reaches the edge of the region, it is clipped, with two periods appended to indicate additional undisplayed text, for example, “You have reached the en..” If the ASFC_ALIGN_NOCLIP flag is set, text still wraps, but it is clipped at the edge of the control without the periods.