ClassesClassesClassesClasses | | | | Operators

get_string_extentsget_string_extentsGetStringExtentsget_string_extentsGetStringExtentsGetStringExtents (Operator)


get_string_extentsget_string_extentsGetStringExtentsget_string_extentsGetStringExtentsGetStringExtents — Get the spatial size of a string.


get_string_extents( : : WindowHandle, Values : Ascent, Descent, Width, Height)

Herror get_string_extents(const Hlong WindowHandle, const char* Values, Hlong* Ascent, Hlong* Descent, Hlong* Width, Hlong* Height)

Herror T_get_string_extents(const Htuple WindowHandle, const Htuple Values, Htuple* Ascent, Htuple* Descent, Htuple* Width, Htuple* Height)

Herror get_string_extents(const HTuple& WindowHandle, const HTuple& Values, Hlong* Ascent, Hlong* Descent, Hlong* Width, Hlong* Height)

Hlong HWindow::GetStringExtents(const HTuple& Values, HTuple* Descent, HTuple* Width, HTuple* Height) const

void GetStringExtents(const HTuple& WindowHandle, const HTuple& Values, HTuple* Ascent, HTuple* Descent, HTuple* Width, HTuple* Height)

HTuple HWindow::GetStringExtents(const HTuple& Values, HTuple* Descent, HTuple* Width, HTuple* Height) const

Hlong HWindow::GetStringExtents(const HString& Values, Hlong* Descent, Hlong* Width, Hlong* Height) const

Hlong HWindow::GetStringExtents(const char* Values, Hlong* Descent, Hlong* Width, Hlong* Height) const

void HOperatorSetX.GetStringExtents(
[in] VARIANT WindowHandle, [in] VARIANT Values, [out] VARIANT* Ascent, [out] VARIANT* Descent, [out] VARIANT* Width, [out] VARIANT* Height)

VARIANT HWindowX.GetStringExtents(
[in] VARIANT Values, [out] VARIANT* Descent, [out] VARIANT* Width, [out] VARIANT* Height)

static void HOperatorSet.GetStringExtents(HTuple windowHandle, HTuple values, out HTuple ascent, out HTuple descent, out HTuple width, out HTuple height)

HTuple HWindow.GetStringExtents(HTuple values, out HTuple descent, out HTuple width, out HTuple height)

int HWindow.GetStringExtents(string values, out int descent, out int width, out int height)


get_string_extentsget_string_extentsGetStringExtentsget_string_extentsGetStringExtentsGetStringExtents queries width and height of the output size of a string using the font of the window. In addition, the extension above and below the baseline is returned (AscentAscentAscentAscentAscentascent and DescentDescentDescentDescentDescentdescent, respectively).

The sizes are measured in the coordinate system of the window (for text windows in pixels). Using get_string_extentsget_string_extentsGetStringExtentsget_string_extentsGetStringExtentsGetStringExtents, it is possible to determine text output and input independently from the used font. The conversion from integer numbers and floating point numbers to text strings is the same as in write_stringwrite_stringWriteStringwrite_stringWriteStringWriteString.



WindowHandleWindowHandleWindowHandleWindowHandleWindowHandlewindowHandle (input_control)  window HWindow, HTupleHTupleHTupleHWindowX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Window handle.

ValuesValuesValuesValuesValuesvalues (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)

Values to consider.

Default value: 'test_string' "test_string" "test_string" "test_string" "test_string" "test_string"

AscentAscentAscentAscentAscentascent (output_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Maximum height above baseline.

DescentDescentDescentDescentDescentdescent (output_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Maximum extension below baseline.

WidthWidthWidthWidthWidthwidth (output_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Text width.

HeightHeightHeightHeightHeightheight (output_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Text height.


get_string_extentsget_string_extentsGetStringExtentsget_string_extentsGetStringExtentsGetStringExtents returns 2 (H_MSG_TRUE) if the window is valid. Otherwise an exception is raised.

Possible Predecessors

open_windowopen_windowOpenWindowopen_windowOpenWindowOpenWindow, set_fontset_fontSetFontset_fontSetFontSetFont

Possible Successors

set_tpositionset_tpositionSetTpositionset_tpositionSetTpositionSetTposition, write_stringwrite_stringWriteStringwrite_stringWriteStringWriteString, read_stringread_stringReadStringread_stringReadStringReadString, read_charread_charReadCharread_charReadCharReadChar

See also

get_font_extentsget_font_extentsGetFontExtentsget_font_extentsGetFontExtentsGetFontExtents, set_tpositionset_tpositionSetTpositionset_tpositionSetTpositionSetTposition, set_fontset_fontSetFontset_fontSetFontSetFont



ClassesClassesClassesClasses | | | | Operators