Download MetaTrader 5

TextGetSize

The function returns the line width and height at the current font settings.

bool  TextGetSize(
   const string       text,          // text string
   uint&               width,        // buffer width in pixels
   uint&               height        // buffer height in pixels
   );

Parameters

text

[in]  String, for which length and width should be obtained.

width

[out]  Input parameter for receiving width.

height

[out]  Input parameter for receiving height.

Return Value

Returns true if successful, otherwise false. Possible code errors:

  • ERR_INTERNAL_ERROR(4001) - operating system error.

See also

Resources, ResourceCreate(), ResourceSave(), TextSetFont(), TextOut()


Updated: 2015.12.03