SetWindowOrgEx (Windows CE 5.0)

Send Feedback

This function specifies which window point maps to the viewport origin (0,0).

SetWindowOrgEx(HDChdc,intX,intY,LPPOINTlpPoint);

Parameters

  • hdc
    [in] Handle to the device context.
  • X
    [in] Specifies the x-coordinate, in logical units, of the new window origin.
  • Y
    [in] Specifies the y-coordinate, in logical units, of the new window origin.
  • lpPoint
    [out] Pointer to a POINT structure that receives the previous origin of the window, in logical units. If lpPoint is NULL, this parameter is not used.

Return Values

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

This helps define the mapping from the logical coordinate space (also known as a window) to the device coordinate space (the viewport). SetWindowOrgEx specifies which logical point maps to the device point (0,0). It has the effect of shifting the axes so that the logical point (0,0) no longer refers to the upper-left corner.

//map the logical point (xWinOrg, yWinOrg) to the device point (0,0)
SetWindowOrgEx (hdc, xWinOrg, yWinOrg, NULL)

This is related to the SetViewportOrgEx function. Generally, you will use one function or the other, but not both. Regardless of your use of SetWindowOrgEx and SetViewportOrgEx, the device point (0,0) is always the upper-left corner.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

POINT | GDI Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.