GreSetProcessControl
Appearance
GreSetProcessControl provides a mechanism to control drawing, boundary computation, and correlation.
This function is supported by the graphics engine.
Syntax
GreSetProcessControl(hdc, flMask, flProcess, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- flMask (ULONG) - input
- Only those flags with the corresponding bit in this parameter set are modified.
- flProcess (ULONG) - input
- Indicates which process-control flags to set.
- Process-control flags:
- PCTL_DRAW
- Has no effect on GreErasePS. If set, drawing primitives should appear on screen. Otherwise, output operations such as GreBitblt, GrePaintRegion, GreSetPel and other drawing primitives are not displayed.
- PCTL_BOUND
- Set to indicate that GPI_BOUNDS must be accumulated.
- PCTL_CORRELATE
- Set to indicate that correlation is to be done.
- PCTL_USERBOUNDS
- When set, indicates that USER_BOUNDS are to be collected for the window manager.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreSetProcessControl.
Return Code
- fSuccess (BOOL) - returns
- Return codes.
- On completion, the handling routine must return BOOLEAN (fSuccess).
- TRUE Successful
- FALSE Error
- Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
- PMERR_HDC_BUSY
- PMERR_INV_HDC
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Remarks
Bounds are returned in graphics model-space coordinates. If a composite transform is applied to the drawing primitives, the bounds values must be transformed back to their original values before merging with the previous bounds values.
Correlation is performed in page-coordinate space on the output of primitives that have been clipped only to the viewing limits and graphics field. Note that correlation is performed for all functions except alphanumeric functions and GreErasePS. Boundary computation is performed for all functions except GreErasePS.
Sample Code
#define INCL_GRE_DCS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG flMask; ULONG flProcess; /* Indicates which process-control flags to set. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreSetProcessControl. */ BOOL fSuccess; /* Return codes. */ fSuccess = GreSetProcessControl(hdc, flMask, flProcess, pInstance, lFunction);