## Presentation Device Driver Reference for OS/2

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

### GreGetRegionBox

Select an item:

    Syntax
    Parameters
    Returns
    Remarks
    Glossary

Simulation support:

This function is simulated by a handling routine in the graphics engine.

Description

GreGetRegionBox loads the buffer pointed to by prclRect with the dimensions of the tightest rectangle around the region indicated by hrgn. Note that the rectangle is always returned in device coordinates. GreGetRegionBox raises an error when hrgn is the handle of the currently selected clip region.

This function can be hooked by the presentation driver.

    #define INCL_GRE_REGIONS

    #include <os2.h>

    HDC       hdc;        /*  Device context handle. */

    HRGN      hrgn;       /*  Region handle. */

    PRECTL    prclRect;   /*  Pointer to rectangle in device coordinates. */

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

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

    LONG      rc;         /*  Return codes. */

    rc = GreGetRegionBox(hdc, hrgn, prclRect,

           pInstance, lFunction);