Purpose
Calculates the width and height of a text.
Type
Function
Syntax
bfntSizeText(
<cText>,
[<oFont | hFont>],
[<lWordBreak>],
[<lPrefix>],
[<iWidthMax>],
[<hDC>]
) Æ oSize
Arguments
<cText> | The text, whose width and height are to be calculated. |
Data type: | String |
<oFont>, <hFont> | The font to which the width and height are to be calculated. As a default, the standard font of Microsoft Windows is used. |
Data type: | Font | Ptr |
<lWordBreak> | A logical value that indicates whether the text is to be break with reaching the width <iWidthMax>. As a default, the value FALSE is used. |
Data type: | Logic |
<lPrefix> | A logical value that indicates whether the character '&' in the text serves to underline the following character. If this is the case, it is not considered with the calculation of the text expansion. As a default, the value FALSE is used. |
Data type: | Logic |
<iWidthMax> | The maximum width that can be achieved by the text. If the width of the text is greater and the argument <lWordBreak> contains the value TRUE, the text is broken on the indicated width. As a default, the value 0 is used. |
Data type: | DWord |
<hDC> | The device context in which the width and height of the text are to be calculated. As a default, the device context of the display is used. |
Data type: | Ptr |
Return Value
oSize | The calculated width and height of the text. |
Data type: | Dimension |
Description
The function bfntSizeText() calculated the width and height of the specified text.
Page url: http://www.YOURSERVER.com/index.html?bfntsizetext.htm