## Presentation Device Driver Reference for OS/2

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

### GreBoxBoth - Syntax

Simulation support:

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

Description

GreBoxBoth draws and fills a rectangular box with one corner at the current (X,Y) position and the opposite corner at the specified (X,Y) position. The current (X,Y) position does not change. When this function occurs within an area or path definition, it generates a closed figure. GreBoxBoth must not occur within any other figure definition.

This function is supported by the graphics engine and can be hooked by the presentation driver.

    #define INCL_GRE_ARCS

    #include <os2.h>

    HDC           hdc;        /*  Device context handle. */

    PBOXPARAMS    pBox;       /*  Pointer to a BOXPARAMS structure: */

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

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

    LONG          rc;

    rc = GreBoxBoth(hdc, pBox, pInstance, lFunction);