Coordinate Spaces

The maximum coordinates allowed in Win32 are not the same as those allowed in OS/2. These maximums are:

┌─────────────────────────┬─────────────────────────┬─────────────────────────┐
│World/Page               │-2[31] to 2[31]-1        │-2[27] to 2[27]-1        │
├─────────────────────────┼─────────────────────────┼─────────────────────────┤
│Device                   │-2[27] to 2[27]-1        │-2[15] to 2[15]-1        │
└─────────────────────────┴─────────────────────────┴─────────────────────────┘

Passing extreme values to the Open32 graphics display interface (GDI) function, even though the values might fall within the above ranges, is not guaranteed to work. There are many factors that can influence whether or not a particular graphics programming interface (GPI) function with a given set of extreme values will provide the expected behavior or not. It is nearly impossible to establish guaranteed maximum coordinates on a per function basis. Because of this, programming tricks that involve passing maximum values to GDI functions is discouraged and not guaranteed to work. An example of such a trick would be to call FillRect with the maximum allowed coordinates to clear a window. Such a call might not work and should be avoided.


[Back: Common Open and Save File Dialog]
[Next: Device Context (DC) for Display Device Driver]