System Metrics

4/8/2010

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 6.5 provides a number of system metrics that offer information about the user's system. These can be queried via the GetSystemMetrics Windows Embedded 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

Concepts

Developing DPI Aware Applications
High DPI Display