Jump to content

GreSetPickWindow: Difference between revisions

From EDM2
Created page with "GreSetPickWindow sets the position and size of the pick window in page-coordinate space for subsequent correlation operations. ;Simulation support: This function is mandator..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreSetPickWindow sets the position and size of the pick window in page-coordinate space for subsequent correlation operations.  
GreSetPickWindow sets the position and size of the pick window in page-coordinate space for subsequent correlation operations.


;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.  
;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.


==Syntax==
==Syntax==
  GreSetPickWindow(hdc, pPick, pInstance, lFunction);
  GreSetPickWindow(hdc, pPick, pInstance, lFunction)


==Parameters==
==Parameters==
;hdc (HDC) - input  
;hdc (HDC) - input:The device context handle.
:The device context handle.  
;pPick (PRECTL) - input:A pointer to a pick window.
 
:The pick window is defined as a RECTL structure in page coordinate space:
;pPick (PRECTL) - input  
:*xLeft Minimum X-coordinate of window
:A pointer to a pick window.  
:*yBottom Minimum Y-coordinate
 
:*xRight Maximum X-coordinate of window
:The pick window is defined as a RECTL structure in page coordinate space:  
:*yTop Maximum Y-coordinate
 
;pInstance (PVOID) - input:A pointer to instance data.
:*xLeft Minimum X-coordinate of window  
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreSetPickWindow.
:*yBottom Minimum Y-coordinate  
:*xRight Maximum X-coordinate of window  
:*yTop Maximum Y-coordinate  
 
;pInstance (PVOID) - input  
:A pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreSetPickWindow.  


==Return Code==
==Return Code==
;fSuccess (BOOL) - returns  
;fSuccess (BOOL) - returns:Return codes.  
:Return codes.  
:On completion, the handling routine must return BOOLEAN (fSuccess).
 
:On completion, the handling routine must return BOOLEAN (fSuccess).  
 
:*TRUE Successful  
:*TRUE Successful  
:*FALSE Error  
:*FALSE Error  

Latest revision as of 10:25, 5 April 2025

GreSetPickWindow sets the position and size of the pick window in page-coordinate space for subsequent correlation operations.

Simulation support
This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

GreSetPickWindow(hdc, pPick, pInstance, lFunction)

Parameters

hdc (HDC) - input
The device context handle.
pPick (PRECTL) - input
A pointer to a pick window.
The pick window is defined as a RECTL structure in page coordinate space:
  • xLeft Minimum X-coordinate of window
  • yBottom Minimum Y-coordinate
  • xRight Maximum X-coordinate of window
  • yTop Maximum Y-coordinate
pInstance (PVOID) - input
A pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreSetPickWindow.

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 handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
  • PMERR_COORDINATE_OVERFLOW
  • PMERR_DEV_FUNC_NOT_INSTALLED
  • PMERR_HDC_BUSY
  • PMERR_INV_COORD_SPACE
  • PMERR_INV_HDC
  • PMERR_INV_IN_AREA
  • PMERR_INV_IN_PATH
  • PMERR_INV_LENGTH_OR_COUNT
  • PMERR_INV_PICK_APERTURE_POSN.

Remarks

The boundary of the pick window is included in the correlated area.

Declaration

#define INCL_GRE_PICK
#include <os2.h>

HDC       hdc;        /*  The device context handle. */
PRECTL    pPick;      /*  A pointer to a pick window. */
PVOID     pInstance;  /*  A pointer to instance data. */
ULONG     lFunction;  /*  High-order WORD=flags; low-order WORD=NGreSetPickWindow. */
BOOL      fSuccess;   /*  Return codes. */

fSuccess = GreSetPickWindow(hdc, pPick, pInstance, lFunction);