Please enable JavaScript to view this site.

A-Shell Development History

MX_GDICALC enhancement - the MXGDI_CALCRECT opcode now supports an optional flags argument which can be used to return the size of the rectangle necessary to print the specified memo text completely (rather than returning the portion of the string that will fit).

xcall MX_GDICALC, MXGDI_CALCRECT, handle, status, lft, top, rght, btm, memo, height, overflow {,flags}

flags  (num)  [in]

Formatting options chosen from the TRF_xxx flags used by //TEXTRECTANGLE (see above), with the mandatory inclusion of the TRF_CALCRECT bit.

In this case, the rght and btm parameters are also returned, indicating the adjusted rectangle dimensions required for printing the memo string. For single line memos (TRF_SINGLELINE set, or TRF_WORDBREAK not set and no CRLFs in the line), the width of the rectangle will be adjusted to fit the text. Otherwise, if TRF_WORDBREAK is specified, it will preserve the width of the rectangle, breaking the lines as needed to fit within that width, and adjusting the height of the rectangle.