Jump to content

DEVESC_BREAK_EXTRA

From EDM2
Revision as of 23:17, 11 July 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:DEVESC_BREAK_EXTRA}} GreEscape DEVESC_BREAK_EXTRA changes the width of the break character on a hardcopy device. ;Simulation support: This function is mandatory for hardcopy drivers, but may simply return a DEVESC_NOTIMPLEMENTED code. For other drivers, it is simulated by a handling routine in the graphics engine. ==Syntax== GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction); ==Parameters== ;''hdc'' (HDC) - input...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GreEscape DEVESC_BREAK_EXTRA changes the width of the break character on a hardcopy device.

Simulation support
This function is mandatory for hardcopy drivers, but may simply return a DEVESC_NOTIMPLEMENTED code. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

GreEscape(hdc, lEscape, cInCount, pInData, pcOutCount, pOutData, pInstance, lFunction);

Parameters

hdc (HDC) - input
Device context handle.
lEscape (LONG) - input
DEVESC_BREAK_EXTRA escape code.
cInCount (LONG) - input
Number of bytes pointed to by pInData. When cInCount=0, the handling routine resets the extra width to 0.
pInData (PBYTE) - input
If cInCount is not equal to 0, pInData is a pointer to a fixed value. This value is the required extra width defined in world coordinates.
pcOutCount (PLONG) - input
The handling routine ignores this parameter.
pOutData (PLONG) - input
The handling routine ignores this parameter.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreEscape.

Returns

rc (LONG) - returns
Return Code.
The handling routine returns:
DEV_OK
Successful
DEVESC_NOTIMPLEMENTED
Escape not implemented for specified code
DEVESC_ERROR
Error

Remarks

The handling routine sets or resets, as determined by the value of cInCount, an extra width value for the break character. Upon completion, the width of the break character is the default width specified by the font plus any extra widths set by DEVESC_BREAK_EXTRA and DEVESC_CHAR_EXTRA. The extra widths can be positive, zero, or negative.

This escape code is implemented by old hardcopy drivers. The function of this escape code is replaced by the character attribute fxBreakExtra. See Character Attributes.

This escape code is metafiled and recorded.

Source Code Sample

Declaration:

#define INCL_GRE_DEVICE
#include <os2.h>

HDC      hdc;         /* Device context handle. */
LONG     lEscape;     /* DEVESC_BREAK_EXTRA escape code. */
LONG     cInCount;    /* Number of bytes pointed to by pInData. */
PBYTE    pInData;     /* If cInCount is not equal to 0, pInData is a pointer to a fixed value. */
PLONG    pcOutCount;  /* The handling routine ignores this parameter. */
PLONG    pOutData;    /* The handling routine ignores this parameter. */
PVOID    pInstance;   /* Pointer to instance data. */
ULONG    lFunction;   /* High-order WORD=flags; low-order WORD=NGreEscape. */
LONG     rc;          /* Return Code. */

rc = GreEscape(hdc, lEscape, cInCount, pInData,
      count, pOutData, pInstance, lFunction);