GreConvert

GreConvert converts the specified coordinates from one coordinate space to another by using the current values of the transforms.

This function can be hooked by the presentation driver.


 * Simulation support: This function is simulated by a handling routine in the graphics engine.

Syntax
GreConvert(hdc, lSrc, lDst, paptlPoint, cPoints, pInstance, lFunction);

Parameters

 * hdc (HDC) - input : Device context handle.


 * lSrc (LONG) - input : Source-coordinate space.
 * CVTC_WORLD :World-coordinate space
 * CVTC_MODEL :Model space
 * CVTC_DEFAULTPAGE :Default page-coordinate space
 * CVTC_PAGE :Page-coordinate space
 * CVTC_DEVICE :Device-coordinate space. Screen coordinates are 32-bit signed integers and are used by the presentation driver as screen pel addresses.


 * lDst (LONG) - input : Target-coordinate space. Defined by the same values as lSrc.


 * paptlPoint (PPOINTL) - input : Pointer to array of (x, y) coordinates to transform. The result is also returned to this parameter.


 * cPoints (LONG) - input : Count of coordinate pairs in the array.


 * pInstance (PVOID) - input : Pointer to instance data.


 * lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreConvert.

Returns

 * fSuccess (BOOL) - returns : This function returns 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_HDC_BUSY
 * PMERR_INV_COORD_SPACE
 * PMERR_INV_HDC
 * PMERR_INV_LENGTH_OR_COUNT

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Sample

 * 1) define INCL_GRE_XFORMS
 * 2) include 

HDC       hdc;         /*  Device context handle. */ LONG      lSrc;        /*  Source-coordinate space. */ LONG      lDst;        /*  Target-coordinate space. Defined by the same values as lSrc. */ PPOINTL   paptlPoint; LONG      cPoints;     /*  Count of coordinate pairs in the array. */ PVOID     pInstance;   /*  Pointer to instance data. */ ULONG     lFunction;   /*  High-order WORD=flags; low-order WORD=NGreConvert. */ BOOL      fSuccess;    /*  This function returns BOOLEAN (fSuccess). */

fSuccess = GreConvert(hdc, lSrc, lDst, paptlPoint,            cPoints, pInstance, lFunction);