Windows SDK: Limit of Logical Coordinate System in WindowsLast reviewed: July 22, 1997Article ID: Q39802 |
3.00
WINDOWS
kbprg
The information in this article applies to:
The limits of the logical coordinate system are from -32768 to +32767. An item can be drawn anywhere within this coordinate system; however, the window extent cannot be set to greater than 32767. (Although this might seem to limit the system to the -16384 to 16383 range, this is not the case.) If the viewport and window are set up properly, everything will be shown. For example, to set up the whole logical coordinate system to be shown within the application's area of the screen, the following code works properly:
/* Establish viewport to be upper-left quarter of client area */ GetClientRect(hWnd, (LPRECT) &CRect); SetViewportOrg(hDC, 0, 0); SetViewportExt(hDC, (CRect.right - CRect.left) / 2, \ (CRect.bottom - CRect.top) / 2); /* Set Window Origin and Extent such that total logical */ /* coordinate system will cover entire client area */ SetWindowOrg(hDC, -32767, -32767); SetWindowExt(hDC, 32767, 32767); |
Additional reference words: mapping modes anisotropic isotropic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |