GetDCOrgEx

The GetDCOrgEx function obtains the final translation origin for a specified device context (DC). The final translation origin specifies an offset that the system uses to translate device coordinates into client coordinates (for coordinates in an application's window).

BOOL GetDCOrgEx(
  HDC hdc,          // device-context handle
  LPPOINT lpPoint   // pointer to structure receiving the translation origin
);
 

Parameters

hdc
Specifies the device context whose final translation origin is to be retrieved.
lpPoint
Pointer to a POINT structure that the function will set to the final translation origin, in device coordinates.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Windows NT: To get extended error information, call GetLastError.

Remarks

The final translation origin is relative to the physical origin of the screen.

QuickInfo

  Windows NT: Requires version 3.5 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Device Contexts Overview, Device Context Functions, CreateIC, POINT