## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreGetCurrentPosition - Syntax

Simulation support:

None. This function is mandatory for all drivers.

Description:

GreGetCurrentPosition takes the current (X,Y) position in world coordinates from the DC instance data structure and stores it at the location addressed by pptlPosition. If COM_TRANSFORM is not set, the current position is returned in screen coordinates.

This function must be supported by all presentation drivers. GreGetCurrentPosition is called by the GpiQueryCurrentPosition function. GreGetCurrentPosition might also be called in response to any of the Presentation Manager drawing functions that begin their operation from the current position within the presentation space.

    #define INCL_GRE_LINES

    #include <os2.h>

    HDC        hdc;           /*  Device context handle. */

    PPOINTL    pptlPosition;  /*  Pointer to current position. */

    PVOID      pInstance;     /*  Pointer to instance data. */

    ULONG      lFunction;     /*  High-order WORD=flags; low-order WORD=NGreGetCurrentPosition.
      * /

    BOOL         rc ;               / *    Return   Code .   * /

    rc   =   GreGetCurrentPosition ( hdc ,   pptlPosition ,

            pInstance ,   lFunction ) ;