Calculate string length

xcall MIAMEX, MX_GDICALC, MXGDI_CALCLEN, handle, status, memo, length

The MXGDI_CALCLEN operation is similar to MXGDI_CALCRECT, except that it just determines how long the string will be when printed—i.e. does not consider the possibility of wrapping it to multiple lines.

Parameter

Type

I/O

Description

handle

B,4

in

Device context handle (from MXGDI_OPEN)

status

F,6

out

MX_GDICALC Status Codes.

memo

String

in

Text string to consider. Should not contain any CRLF characters.

length

Num

out

Returns the length (i.e. width) required to print memo text in the current font and device context, in the mapmode units specified in the MXGDI_OPEN operation.