## Presentation Device Driver Reference for OS/2

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

### GreCreateRectRegion - Parameters

hdc (HDC) - input Device context handle.

paRegion (PRECT) - input Pointer to the region definition.

This is a pointer to an array of rectangle structures, which defines the region. Each rectangle is described by a RECTL structure:

xLeft Minimum x-coordinate of rectangle
yBottom Minimum y-coordinate
xRight Maximum x-coordinate of rectangle
yTop Maximum y-coordinate

For each rectangle, xRight must be equal to or greater than xLeft. yTop must be equal to or greater than yBottom. The bottom and left boundaries of each rectangle are part of the interior of the region; the top and right boundaries are not.

cRect (LONG) - input Number of rectangles in the region definition.

If this is 0, an empty region is created.

pInstance (PVOID) - input Pointer to instance data.

lFunction (ULONG) - input High-order WORD=flags; low-order WORD= NGreCreateRectRegion.

rc (HRGN) - returns Return codes.

On completion, the handling routine returns the region handle (hrgn), or RGN_ERROR if an error occurred.

Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:

PMERR_INSUFFICIENT_MEMORY
PMERR_INV_COORDINATE
PMERR_INV_HRGN
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_RECT

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.