System Metrics
To be DPI aware, an application can make no assumptions about the pixel sizes of various Windows screen elements, such as icon sizes or border widths. Windows Mobile-based Smartphones and Pocket PCs provide a number of system metrics that offer information about the user's system. These can be queried via the GetSystemMetrics Windows CE-based function.
For example:
- Screen size dimensions such as 240 or 320 should not be assumed. These should be obtained using GetSystemMetrics(SM_CXSCREEN) or GetSystemMetrics(SM_CYSCREEN).
- Border dimensions are not necessarily one pixel. These should be obtained using GetSystemMetrics(SM_CXBORDER) or GetSystemMetrics(SM_CYBORDER).
- Large and small icon sizes are not necessarily 16 and 32. These should be obtained using GetSystemMetrics(SM_CXICON) or GetSystemMetrics(SM_CXSMICON).
See Also
Developing DPI Aware Applications | High DPI Display
Send Feedback on this topic to the authors