SetWindowOrgEx

3.1

  BOOL SetWindowOrgEx(hdc, nX, nY, lpPoint)    
  HDC hdc; /* handle of device context */
  int nX; /* x-coordinate of window, */  
  int nY; /* y-coordinate of window, */  
  POINT FAR* lpPoint; /* address of struct. with prev. origin */

The SetWindowOrgEx function sets the window origin of the specified device context. The window, along with the viewport, defines how points are mapped from logical coordinates to device coordinates.

Parameters

hdc

Identifies the device context.

nX

Specifies the logical x-coordinate of the new origin of the window.

nY

Specifies the logical y-coordinate of the new origin of the window.

lpPoint

Points to a POINT structure. The previous origin of the window is placed in this structure. If lpPoint is NULL nothing is returned. The POINT structure has the following form:

typedef struct tagPOINT {   /* pt */
   int x;
   int y;
} POINT;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

The return value is nonzero if the function is successful. Otherwise, it is zero.

See Also

SetViewportOrgEx