Jump to content

GreSetProcessControl: Difference between revisions

From EDM2
Created page with "GreSetProcessControl provides a mechanism to control drawing, boundary computation, and correlation. This function is supported by the graphics engine. ==Syntax== GreSetP..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreSetProcessControl provides a mechanism to control drawing, boundary computation, and correlation.  
GreSetProcessControl provides a mechanism to control drawing, boundary computation, and correlation.


This function is supported by the graphics engine.  
This function is supported by the graphics engine.


==Syntax==
==Syntax==
  GreSetProcessControl(hdc, flMask, flProcess, pInstance, lFunction);
  GreSetProcessControl(hdc, flMask, flProcess, pInstance, lFunction)


==Parameters==
==Parameters==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
: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.
;flMask (ULONG) - input  
:Process-control flags:
:Only those flags with the corresponding bit in this parameter set are modified.  
:;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.
;flProcess (ULONG) - input  
:;PCTL_CORRELATE:Set to indicate that correlation is to be done.
:Indicates which process-control flags to set.  
:;PCTL_USERBOUNDS:When set, indicates that USER_BOUNDS are to be collected for the window manager.
 
;pInstance (PVOID) - input:Pointer to instance data.
:Process-control flags:  
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreSetProcessControl.
 
:;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==
==Return Code==
;fSuccess (BOOL) - returns  
;fSuccess (BOOL) - returns:Return codes.
:Return codes.  
:On completion, the handling routine must return BOOLEAN (fSuccess).
 
:*TRUE Successful
:On completion, the handling routine must return BOOLEAN (fSuccess).  
:*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:
:*TRUE Successful  
:*PMERR_HDC_BUSY
:*FALSE Error  
:*PMERR_INV_HDC
 
:Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation.
: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==
==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.  
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.  
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==
==Sample Code==

Latest revision as of 03:30, 24 January 2020

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);