DWORD SetWindowOrg(hDC,X,Y)
This function sets the window origin of the specified device context. The window, along with the device-context viewport, defines how GDI maps points in the logical coordinate system to points in the device coordinate system.
The window origin marks the point in the logical coordinate system from which GDI maps the viewport origin, a point in the device coordinate system specified by the SetWindow-Org function. GDI maps all other points by following the same process required to map the window origin to the viewport origin. For example, all points in a circle around the point at the window origin will be in a circle around the point at the viewport origin. Similarly, all points in a line that passes through the window origin will be in a line that passes through the viewport origin.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
X | int Specifies the logical x-coordinate of the new origin of the window. | |
Y | int Specifies the logical y-coordinate of the new origin of the window. |
The return value specifies the previous origin of the window. The previous y-coordinate is in the high-order word; the previous x-coordinate is in the low-order word.