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 function retrieves the dimensions of Microsoft® Windows® display elements and system configuration settings of a remote Windows Embedded CE–based device. All dimensions retrieved by 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 CeGetLastErrorfunction does not provide extended error information.

Remarks

Windows Embedded CE Remarks

System metrics may vary from display to display.

If the Windows Embedded CE–based device you are targeting supports a mouse cursor, you can use the SM_CXCURSOR or SM_CYCURSOR values in the nIndexparameter.

Windows Embedded CE versions that support mouse cursors include the Iconcursand Mcursorcomponents rather than the Iconand Cursorcomponents.

General Remarks

System metrics may vary from display to display.

The SM_ARRANGE setting specifies how the system arranges minimized windows, and consists of a starting position and a direction. The starting position can be one of the following values.

Value Description

ARW_BOTTOMLEFT

Start at the lower-left corner of the screen (default position).

ARW_BOTTOMRIGHT

Start at the lower-right corner of the screen. Equivalent to ARW_STARTRIGHT.

ARW_HIDE

Hide minimized windows by moving them off the visible area of the screen.

ARW_TOPLEFT

Start at the upper-left corner of the screen. Equivalent to ARV_STARTTOP.

ARW_TOPRIGHT

Start at the upper-right corner of the screen. Equivalent to ARW_STARTTOP | SRW_STARTRIGHT.

The direction in which to arrange can be one of the following values.

Value Description

ARW_DOWN

Arrange vertically, top to bottom.

ARW_LEFT

Arrange horizontally, left to right.

ARW_RIGHT

Arrange horizontally, right to left.

ARW_UP

Arrange vertically, bottom to top.

Requirements

Header rapi.h
Library rapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later

See Also