Important: The information in this document is obsolete and should not be used for new development.
ScreenRes
If you need to determine the resolution of the main device, you can use theScreenRes
procedure.
PROCEDURE ScreenRes (VAR scrnHRes,scrnVRes: Integer);DESCRIPTION
In thescrnHRes
parameter, theScreenRes
procedure returns the number of horizontal pixels per inch displayed by the current device. In thescrnVRes
parameter, it returns the number of vertical pixels per inch.To determine the resolutions of all available graphics devices, you should examine their
GDevice
records (described on page 5-14). The horizontal and vertical resolutions for a graphics device are stored in thehRes
andvRes
fields, respectively, of thePixMap
record for the device'sGDevice
record.SPECIAL CONSIDERATIONS
Currently, QuickDraw and the Printing Manager always assume a screen resolution of 72 dpi.Do not use the actual screen resolution as a scaling factor when drawing into a printing graphics port; instead, always use 72 dpi as the scaling factor. See the chapter "Printing Manager" in this book for more information about the Printing Manager and drawing into a printing graphics port.
ASSEMBLY-LANGUAGE INFORMATION
The horizontal resolution, in pixels per inch, is stored in the global variableScrHRes
, and the vertical resolution is stored in the global variableScrVRes
.