Screen Metrics

The screen metrics, specified by the GDIINFO structure, define such items as width and height in millimeters, screen resolution, aspect ratio, and standard mapping modes. GDI uses screen metrics to generate coordinate data that is appropriate for the display hardware. The only screen metrics that a display driver must set are the dpHorzRes and dpVertRes members to specify the width and height of the screen in pixels. GDI reads the values for dpLogPixelsX and dpLogPixelsY from the registry so drivers should not set these values. All other screen metrics, dpHorzSize, dpVertSize, dpAspectX, dpAspectY, dpAspectXY, and the various mapping mode members are calculated by GDI.

The driver must set the dpStyleLen member. The styled-line length specifies the length of the smallest line segment the display driver uses to build the dots and dashes of a styled line. GDI uses this number when it draws into bitmaps and on displays. To ensure consistency between displays and printers, the styled line segment length is always two times the value of the dpAspectXY member.