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

This method retrieves the dimensions of Microsoft® Windows® display elements and system configuration settings of a remote Windows Embedded CE–based device. All dimensions retrieved by IRAPISession::CeGetSystemMetricsare in pixels.

Syntax

INT CeGetSystemMetrics(
  INT 
nIndex
);

Parameters

nIndex

[in] Specifies the system metric or configuration setting to retrieve. All SM_CX* values are widths. All SM_CY* values are heights. The following values are defined.

Value Description

SM_CMONITORS

Number of display monitors on the Windows Embedded CE-based device. Supported in Windows Embedded CE versions 4.0 and later.

SM_CXBORDER

SM_CYBORDER

Width and height, in pixels, of a window border. This is equivalent to the SM_CXEDGE value for windows with the 3-D look.

SM_CXCURSOR

SM_CYCURSOR

Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes. This value is only valid for devices that support cursors.

SM_CXDLGFRAME

SM_CYDLGFRAME

Same as SM_CXFIXEDFRAME and SM_CYFIXEDFRAME.

SM_CXDOUBLECLK

SM_CYDOUBLECLK

Width and height, in pixels, of the rectangle around the location of a first click in a double-click sequence. The second click must occur within this rectangle for the system to consider the two clicks a double-click. (The two clicks must also occur within a specified time.)

SM_CXEDGE, SM_CYEDGE

Dimensions, in pixels, of a 3-D border. These are the 3-D counterparts of SM_CXBORDER and SM_CYBORDER.

SM_CXFIXEDFRAME, SM_CYFIXEDFRAME

Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. SM_CXFIXEDFRAME is the width of the horizontal border and SM_CYFIXEDFRAME is the height of the vertical border.

Same as SM_CXDLGFRAME and SM_CYDLGFRAME.

SM_CXICON, SM_CYICON

The default width and height, in pixels, of an icon. The LoadIconfunction can load only icons of these dimensions.

SM_CXICONSPACING, SM_CYICONSPACING

Dimensions, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of this size when arranged. These values are always greater than or equal to SM_CXICON and SM_CYICON.

SM_CXSCREEN

SM_CYSCREEN

Width and height, in pixels, of the screen of the primary display monitor. These are the same values you obtain by calling GetDeviceCaps( hdcPrimaryMonitor, HORZRES/VERTRES).

SM_CXSMICON

SM_CYSMICON

Recommended dimensions, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view.

SM_CXVIRTUALSCREEN

SM_CYVIRTUALSCREEN

Width and height, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. Supported in Windows Embedded CE versions 4.0 and later.

SM_CXVSCROLL

SM_CYVSCROLL

Width, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical scroll bar.

SM_CYCAPTION

Height, in pixels, of a normal caption area.

SM_CYMENU

Height, in pixels, of a single-line menu bar.

SM_DEBUG

TRUE or nonzero if the debugging version of USER.EXE is installed; FALSE or zero otherwise.

SM_MOUSEPRESENT

TRUE or nonzero if a mouse is installed; FALSE or zero otherwise.

SM_MOUSEWHEELPRESENT

TRUE or nonzero if a mouse with a wheel is installed; FALSE or zero otherwise.

SM_SAMEDISPLAYFORMAT

TRUE if all the display monitors have the same color format, FALSE otherwise. Supported in Windows Embedded CE versions 4.0 and later.

SM_XVIRTUALSCREEN

SM_YVIRTUALSCREEN

Coordinates for the left side and the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. Supported in Windows Embedded CE versions 4.0 and later.

Return Value

The requested system metric or configuration setting indicates success. Zero indicates failure. The IRAPISession::CeGetLastErrorfunction does not provide extended error information.

Remarks

System metrics may vary from display to display.

Requirements

Header rapi2.h
Library ole32.lib, rapiuuid.lib
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also