GreGetDCOrigin

GreGetDCOrigin queries the origin of the device context that defines the bottom-left drawing origin for a display device or a banded hardcopy device.

This function must be supported by presentation drivers for display devices and for hardcopy devices that use banding. For other devices, the minimum requirement is for the handling routine to return Successful with pptlOrigin set to (0,0).


 * Simulation support: None. This function is mandatory for all drivers.

Syntax
GreGetDCOrigin(hdc, pptlOrigin, pInstance, lFunction);

Parameters

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


 * pptlOrigin (PPOINTL) - input
 * Pointer to the (X,Y) coordinates of the returned DC origin in screen coordinates.


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


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

Return Code

 * rc (BOOL) - returns
 * Return Code.


 * On completion, the handling routine must return a BOOLEAN value to indicate success or an error.


 * TRUE Successful
 * FALSE Error

Remarks
The DC origin is set by GreSetupDC (see GreSetupDC) at the graphics engine, and by GreDeviceSetDCOrigin (see GreDeviceSetDCOrigin) at the presentation driver. This device context origin is stored in the Device Context Instance (DCI) data structure addressed by pInstance. The DC origin is always returned in screen coordinates.

Sample Code

 * 1) define INCL_GRE_DEVMISC3
 * 2) include 

HDC       hdc;         /*  Device context handle. */ PPOINTL   pptlOrigin;  /*  Pointer to the (X,Y) coordinates of the returned DC origin in screen coordinates. */ PVOID     pInstance;   /*  Pointer to instance data. */ ULONG     lFunction;   /*  High-order WORD=flags; low-order WORD=NGreGetDCOrigin. */ BOOL      rc;          /*  Return Code. */

rc = GreGetDCOrigin(hdc, pptlOrigin, pInstance,      lFunction);

