GreCreateRectRegion
Appearance
GreCreateRectRegion creates a region by taking the OR of a series of rectangles. When no rectangles are specified (that is, cRect is 0), an empty region is created. If COM_TRANSFORM is not set, the function expects the points to be in device coordinates.
This function can be hooked by the presentation driver.
- Simulation support
- This function is simulated by a handling routine in the graphics engine.
Syntax
GreCreateRectRegion(hdc, paRegion, cRect, pInstance, lFunction)
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.
- 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.
Returns
- 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.