* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *
This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Sets the text format
Syntax
lretCode = XPButton_SetTextFormat(hwnd, ctrlID, dwTextFlags [, Redraw])
Returns
Number.
Parameters
|
|
|
|
|
hWnd
|
Number
|
No
|
Handle of the dialog containing the control
|
ctrlID
|
Number
|
No
|
Control identifier
|
dwTextFlags
|
Number
|
No
|
Format values.
Default: %DT_CENTER OR %DT_VCENTER OR %DT_SINGLELINE
Use one or more of the following equates:
| %DT_BOTTOM | Renders the text string at the bottom of the display rectangle. This value is used only with the DT_SINGLELINE value. |
| %DT_CALCRECT | Determines the width and height of the display rectangle. |
| %DT_CENTER | Centers text horizontally in the display rectangle. |
| %DT_EDITCONTRO | Duplicates the text-displaying characteristics of a multiline edit control. Specifically, the average character width is calculated in the same manner as for an edit control, and the function does not display a partially visible last line. |
| %DT_END_ELLIPSIS | Truncates a text string that is wider than the display rectangle and adds an ellipsis to indicate the truncation. The string is not modified unless the %DT_MODIFYSTRING flag is specified. |
| %DT_EXPANDTABS | Expands tab characters. The default number of characters per tab is eight. The %DT_WORD_ELLIPSIS, %DT_PATH_ELLIPSIS, and %DT_END_ELLIPSIS values cannot be used with the %DT_EXPANDTABS value. |
| %DT_EXTERNALLEADING | Includes the external leading of a font in the line height. Normally, external leading is not included in the height of a line of text. |
| %DT_HIDEPREFIX | Ignores the prefix character & in the text. The letter that follows is not underlined, but other prefix characters are still processed. For example: |
| %DT_LEFT | Aligns text to the left. |
| %DT_MODIFYSTRING | Modifies a string to match the displayed text. This value has no effect unless %DT_END_ELLIPSIS or %DT_PATH_ELLIPSIS is specified. |
| %DT_NOCLIP | Draws the text string without clipping the display rectangle. |
| %DT_NOFULLWIDTHCHARBREAK | Prevents a line break at a double-byte character set (DBCS), so that the line-breaking rule is equivalent to single-byte character set (SBCS). This can be used, for example, to make icon labels written in Korean text more readable. This value has no effect unless %DT_WORDBREAK is specified. |
| %DT_NOPREFIX | Turns off processing of prefix characters. Normally, DrawThemeText interprets the prefix character & as a directive to underscore the character that follows, and the prefix characters && as a directive to print a single &. By specifying %DT_NOPREFIX, this processing is turned off. For example: |
| %DT_PATH_ELLIPSIS | Replaces characters in the middle of text with an ellipsis so that the result fits in the display rectangle. If the string contains backslash (\) characters, %DT_PATH_ELLIPSIS preserves as much as possible of the text after the last backslash. The string is not modified unless the %DT_MODIFYSTRING flag is specified. |
| %DT_PREFIXONLY | Draws only an underline at the position of the character following the prefix character &. Normally DrawThemeText interprets the & as a directive to underline the character that follows and the prefix characters && as a directive to print a single &. By specifying %DT_PREFIXONLY, no characters are drawn, only an underline. White spaces are placed in the positions where characters would normally appear. For example: |
| %DT_RIGHT | Aligns text to the right. |
| %DT_RTLREADING | Lays out text in right-to-left order for bidirectional text, for example, text in a Hebrew or Arabic font. The default direction for text is left-to-right. |
| %DT_SINGLELINE | Displays text on a single line. Carriage returns and line feeds do not break the line. |
| %DT_TABSTOPS | Sets tab stops. |
| %DT_TOP | Renders the text at the top of the display rectangle. |
| %DT_VCENTER | Centers text vertically. This value is used only with the %%DT_SINGLELINE value. |
| %DT_WORDBREAK | Breaks lines between words if a word would extend past the edge of the display rectangle. A carriage return/line feed ($CRLF) sequence also breaks the line. |
| %DT_WORD_ELLIPSIS | Truncates any word that does not fit in the display rectangle and adds an ellipsis. |
|
Redraw
|
Number
|
Yes
|
%TRUE or %FALSE to force a redraw of the control
|
Remarks
Restrictions
See also
Examples