GreGetPickWindow

From EDM2
Jump to: navigation, search

GreGetPickWindow stores (at the location addressed by pPick) a RECTL structure giving the position and size of the pick window in page-coordinate space.

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

Syntax

GreGetPickWindow(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.
pInstance (PVOID) - input
A pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreGetPickWindow.

Returns

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_DEV_FUNC_NOT_INSTALLED
  • PMERR_INV_HDC

Sample

#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=NGreGetPickWindow. */
BOOL      fSuccess;   /*  Return codes. */

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