Jump to content

GreSetPickWindow

From EDM2

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