Simulation support:

None. This function is mandatory for all drivers.

Description:

GreQueryCharPositions stores, at the location addressed by paptXY, an array of world coordinates identifying the start points at which the device is to place each character of a given string.

This function must be supported by the presentation driver. GreQueryCharPositions is called by GpiQueryCharStringPos, and is used to get the position where the next string output would occur relative to the current presentation space position. It also returns the starting position of each character within that string.

#define INCL_GRE_STRINGS
#include <os2.h>

HDC        hdc;        /*  Device context handle. */
PPOINTL    pptlStart;  /*  Pointer to (X,Y) coordinates of optional starting position. */
ULONG      flOptions;  /*  Options flags. */
LONG       cChars;     /*  Number of bytes in string. */
PCH        pchString;  /*  Pointer to character string. */
PLONG      pAdx;       /*  Pointer to Increment array. */
PPOINTL    paptXY;     /*  Pointer to array where character positions are returned. */
PVOID      pInstance;  /*  Pointer to instance data. */
ULONG      lFunction;  /*  High-order WORD=flags; low-order WORD=NGreQueryCharPositions. */
BOOL       rc;         /*  Return Code. */

rc = GreQueryCharPositions(hdc, pptlStart,
       flOptions, cChars, pchString, pAdx,
       paptXY, pInstance, lFunction);


[Back: GreQueryCharPositions]
[Next: GreQueryCharPositions Parameter - hdc]