Jump to content

DEVESC_CHAR_EXTRA

From EDM2

GreEscape DEVESC_CHAR_EXTRA changes the width of all characters, including 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_CHAR_EXTRA escape code.
cInCount (LONG) - input
Number of bytes pointed to by pInData. When cInCount=0, the handling routine should reset 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 defined by the value of cInCount, an extra width value. Upon completion, the width of a character is the default width specified by the font plus the extra width set by DEVESC_CHAR_EXTRA. The extra width 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, fxExtra. 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_CHAR_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,
       pcOutCount, pOutData, pInstance, lFunction);