## Presentation Device Driver Reference for OS/2

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

### GreSetRectRegion

Select an item:

    Syntax
    Parameters
    Returns
    Glossary

Simulation support:

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

Description

GreSetRectRegion sets the specified region to the region definition given by an array of rectangles, unless the region is in use as a clipping region (in which case, an error is raised). When no rectangles are specified, that is, cRect is 0, GreSetRectRegion produces an empty 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    parcRgn;    /*  Pointer to region definition. */

    LONG      cRect;      /*  Count of rectangles in the region definition. */

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

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

    BOOL      fSuccess;   /*  Return codes. */

    fSuccess = GreSetRectRegion(hdc, hrgn, parcRgn,

                 cRect, pInstance, lFunction);