Jump to content

GreGetProcessControl: Difference between revisions

From EDM2
Created page with "GreGetProcessControl returns the process control flags. This function is supported by the graphics engine. ==Syntax== GreGetProcessControl(hdc, pInstance, lFunction); ==..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreGetProcessControl returns the process control flags.  
GreGetProcessControl returns the process control flags.


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


==Syntax==
==Syntax==
  GreGetProcessControl(hdc, pInstance, lFunction);
  GreGetProcessControl(hdc, pInstance, lFunction)


==Parameters==
==Parameters==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;pInstance (PVOID) - input:Pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreGetProcessControl.
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreGetProcessControl.  


==Return Code==
==Return Code==
;rc (LONG) - returns  
;rc (LONG) - returns:Return codes.
:Return codes.  
:This function returns the process control flags (flProcess), or DCTL_ERROR if an error occurs. The flags returned are:
 
:*PCTL_DRAW Draw flag
:This function returns the process control flags (flProcess), or DCTL_ERROR if an error occurs. The flags returned are:  
:*PCTL_BOUND GPI_BOUNDS flag
 
:*PCTL_CORRELATE Correlate flag
:*PCTL_DRAW Draw flag  
:*PCTL_USERBOUNDS USER_BOUNDS flag
:*PCTL_BOUND GPI_BOUNDS flag  
:*PCTL_AREA When set, an area definition is in progress
:*PCTL_CORRELATE Correlate flag  
:*COM_PATH When set, a path definition is in progress
:*PCTL_USERBOUNDS USER_BOUNDS flag  
:Other flags are reserved and should be ignored.
:*PCTL_AREA When set, an area definition is in progress  
:Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
:*COM_PATH When set, a path definition is in progress  
:*PMERR_HDC_BUSY
 
:*PMERR_INV_HDC
:Other flags are reserved and should be ignored.  
: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.  


==Sample Code==
==Sample Code==

Latest revision as of 22:19, 24 March 2020

GreGetProcessControl returns the process control flags.

This function is supported by the graphics engine.

Syntax

GreGetProcessControl(hdc, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreGetProcessControl.

Return Code

rc (LONG) - returns
Return codes.
This function returns the process control flags (flProcess), or DCTL_ERROR if an error occurs. The flags returned are:
  • PCTL_DRAW Draw flag
  • PCTL_BOUND GPI_BOUNDS flag
  • PCTL_CORRELATE Correlate flag
  • PCTL_USERBOUNDS USER_BOUNDS flag
  • PCTL_AREA When set, an area definition is in progress
  • COM_PATH When set, a path definition is in progress
Other flags are reserved and should be ignored.
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.

Sample Code

#define INCL_GRE_DCS
#include <os2.h>

HDC      hdc;        /*  Device context handle. */
PVOID    pInstance;  /*  Pointer to instance data. */
ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreGetProcessControl. */
LONG     rc;         /*  Return codes. */

rc = GreGetProcessControl(hdc, pInstance, lFunction);