## Presentation Device Driver Reference for OS/2

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

### GreSetRectRegion - Parameters

hdc (HDC) - input Device context handle.

hrgn (HRGN) - input Region handle.

parcRgn (PRECTL) - input Pointer to region definition.

The region is defined as an array of rectangles. Each rectangle in the array is defined by a RECTL structure:

xLeft Minimum X-coordinate of rectangle
yBottom Minimum Y-coordinate
xRight Maximum X-coordinate of rectangle
yTop Maximum Y-coordinate

The region is defined by the OR of all the rectangles. 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. If COM_TRANSFORM is not set, the function expects rectangles to be in device coordinates.

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

pInstance (PVOID) - input Pointer to instance data.

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

fSuccess (BOOL) - returns Return codes.

This function returns BOOLEAN (fSuccess).

TRUE Successful
FALSE Error.

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_HRGN_BUSY
PMERR_INSUFFICIENT_MEMORY
PMERR_INV_COORDINATE
PMERR_INV_HRGN
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_RECT
PMERR_REGION_IS_CLIP_REGION

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