Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

You can use the GetSystemMetricsfunction to obtain system configuration settings on both single screen and multiple screen systems. GetSystemMetricsreturns values specific to the primary screen for all metrics that were supported in versions earlier than Windows CE .NET 4.0.

The following metrics are the same for all device drivers:

  • SM_CXCURSOR

  • SM_CYCURSOR

  • SM_CXICON

  • SM_CYICON

The following display capabilities are the same for all screens:

  • LOGPIXELSX

  • LOGPIXELSY

  • DESTOPHORZRES

  • DESKTOPVERTRES

GetSystemMetricsalso uses constants that refer only to a multiple screen system. The following table describes these constants.

Constant Description

SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN

Indicates the coordinates of upper-left corner of the virtual screen.

SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN

Indicates the width and height of the virtual screen.

SM_CMONITORS

Indicates the number of screens attached to the device.

SM_SAMEDISPLAYFORMAT

Indicates whether all the screens have the same color format.

To get information about a single screen or all of the screens in the virtual screen, use the EnumDisplayMonitorsfunction.

To change the work area of a screen, call the SystemParametersInfofunction with the uiActionparameter set to SPI_SETWORKAREA and the pvParamparameter pointing to a RECTstructure that is located on the desired screen. If pvParamis NULL, SystemParametersInfomodifies the work area of the primary screen. Calling SystemParametersInfowith uiActionset to SPI_GETWORKAREA always retrieves the work area of the primary screen. To get the work area of a screen other than the primary screen, call the GetMonitorInfofunction.