## Presentation Device Driver Reference for OS/2

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

### GreRectInRegion - Parameters

hdc (HDC) - input Device context handle.

hrgn (HRGN) - input Region handle.

prclRect (PRECTL) - input Pointer to rectangle in device coordinates.

RECTL structure:

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

The rectangle passed is considered "exclusive" on the right and top sides. If the rectangle represents the bounding box of a graphic object to be drawn, the drawing might include the right and top sides. In this case, the caller should "inflate" the top and right sides by one unit in device- coordinate space.

pInstance (PVOID) - input Pointer to instance data.

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

rc (LONG) - returns Return codes.

This function returns an integer (lInside) indicating whether the rectangle is inside the region:

RRGN_ERROR Error
RRGN_INSIDE All in region
RRGN_PARTIAL Partially in region
RRGN_OUTSIDE Not in region

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_INV_COORDINATE
PMERR_INV_HRGN
PMERR_INV_RECT
PMERR_REGION_IS_CLIP_REGION

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