网站首页  词典首页

请输入您要查询的函数:

 

术语 getsystemmetrics
释义 GetSystemMetrics
语法:
C++
int WINAPI GetSystemMetrics(
__in int nIndex
);
GetSystemMetrics函数
检索指定的系统公制或系统配置设置。
请注意,GetSystemMetrics检索的所有方面的像素。
参数
nIndex [in]
度量或配置设置要检索系统。此参数可以是下列值之一。请注意,所有SM_CX *值宽度和所有SM_CY *值的高度。另请注意,所有设置用来返回布尔数据表示为任何非零的值为TRUE,作为一个零值为FALSE。
ValueMeaning
SM_ARRANGE
56The标志指定系统如何安排最小化的窗口。有关更多信息,请参阅本主题中的备注部分。
SM_CLEANBOOT
67The值,指定系统如何启动:
0正常开机
1故障安全引导
2故障安全的网络启动
阿故障安全引导(也称为称为SafeBoot,安全模式,或干净启动)绕过用户启动文件。
SM_CMONITORS
80The人数显示器在桌面上。有关更多信息,请参阅本主题中的备注部分。
SM_CMOUSEBUTTONS
43The人数鼠标,或者零,如果没有安装鼠标的按钮。
SM_CXBORDER
调取宽度的窗口边框,以像素为单位。这相当于为与三维看看窗户SM_CXEDGE价值。
SM_CXCURSOR
第十三光标宽度,以像素为单位。该系统无法创建其他大小游标。
SM_CXDLGFRAME
7This值与SM_CXFIXEDFRAME相同。
SM_CXDOUBLECLK
36The宽度约在第一次单击一个双击矩形序列的位置,以像素为单位。第二次的点击,必须发生在是由SM_CXDOUBLECLK和SM_CYDOUBLECLK界定的系统考虑的两个点击一个双击矩形。点击这两个发生在还必须在指定的时间。
要设置双击矩形的宽度,请SystemParametersInfo与SPI_SETDOUBLECLKWIDTH。
SM_CXDRAG
68The上的像素数量任鼠标一边向下一点,可以移动鼠标指针拖动操作前开始。这允许用户点击并释放没有无意中开始拖动操作鼠标按钮容易。如果此值为负,这是减去鼠标左侧的下拉点,增加了它的权利。
SM_CXEDGE
45The宽度三维边界像素。这个数据是三维SM_CXBORDER对应。
SM_CXFIXEDFRAME
7The厚度周围的一个窗口,有一个标题,但没有相当大的像素,周边框架。 SM_CXFIXEDFRAME是横向边界的高度,SM_CYFIXEDFRAME是垂直边框的宽度。
此值为SM_CXDLGFRAME相同。
SM_CXFOCUSBORDER
83The宽度的焦点矩形的DrawFocusRect提请左,右边缘。此值是在像素。
Windows 2000中:此值不支持。
SM_CXFRAME
32This值与SM_CXSIZEFRAME相同。
SM_CXFULLSCREEN
16The宽度客户端区域的全面的主显示屏屏幕窗口,以像素为单位。为了获取屏幕不是由系统任务栏或桌面应用程序的工具栏遮挡部分坐标,请与SPI_GETWORKAREA值使用SystemParametersInfo函数。
SM_CXHSCROLL
第二十一宽度箭头位图上的Level滚动条,以像素为单位。
SM_CXHTHUMB
10The宽度拇指框Level滚动条,以像素为单位。
SM_CXICON
至11的图标默认宽度,以像素为单位。该LoadIcon功能可以加载的维度SM_CXICON和SM_CYICON仅指定图标。
SM_CXICONSPACING
38The宽度为大图标视图项目的网格单元,以像素为单位。每个项目放置到一个大小SM_CYICONSPACING的安排SM_CXICONSPACING时矩形。此值总是大于或等于SM_CXICON。
SM_CXMAXIMIZED
61The默认宽度,以像素为最大化的顶层窗口在主显示屏。
SM_CXMAXTRACK
59The默认的一个窗口,有一个标题,尺寸边界像素,最大宽度。该指标指的是整个桌面。用户不能拖动窗框到这些方面比大小。一个窗口可以覆盖处理WM_GETMINMAXINFO消息此值。
SM_CXMENUCHECK
71The宽度默认的菜单检查标记位图,以像素为单位。
SM_CXMENUSIZE
54The宽度如子窗口的关闭按钮,在多文档界面用于像素的菜单栏按钮。
SM_CXMIN
28The最小宽度的一个窗口,以像素为单位。
SM_CXMINIMIZED
57The宽度最小化窗口,以像素为单位。
SM_CXMINSPACING
47The宽度为最小化窗口网格单元,以像素为单位。每一个最小化的窗口放置到一个矩形排列时,这种规模的。此值总是大于或等于SM_CXMINIMIZED。
SM_CXMINTRACK
34The一个窗口最小追踪宽度,以像素为单位。用户不能拖动窗框为比这些更小的尺寸大小。一个窗口可以覆盖处理WM_GETMINMAXINFO消息此值。
SM_CXPADDEDBORDER
92The边界填充的数量字幕窗口,以像素为单位。
Windows XP/2000操作系统:此值不支持。
SM_CXSCREEN
0The宽度的主显示屏的屏幕,像素为单位。这是相同的值通过调用GetDeviceCaps获得如下:GetDeviceCaps(hdcPrimaryMonitor,HORZRES)。
SM_CXSIZE
第三十宽度按钮在窗口的标题或标题栏,以像素为单位。
SM_CXSIZEFRAME
32The厚度周围的一个窗口,可以在像素大小,周长尺寸边界。 SM_CXSIZEFRAME是Level边框宽度,SM_CYSIZEFRAME是边界的垂直高度。
此值为SM_CXFRAME相同。
SM_CXSMICON
49The建议宽度的一个小图标,以像素为单位。小图标通常显示在窗口的标题和小图标视图。
SM_CXSMSIZE
52The宽度小标题按钮,以像素为单位。
SM_CXVIRTUALSCREEN
78The宽度的虚拟屏幕,像素为单位。这种虚拟屏幕是所有显示器边框。该SM_XVIRTUALSCREEN度量是对虚拟屏幕左侧的坐标。
SM_CXVSCROLL
2The宽度垂直滚动条,以像素为单位。
SM_CYBORDER
6The高度的窗口边框,以像素为单位。这相当于为与三维看看窗户SM_CYEDGE价值。
SM_CYCAPTION
4The高度的标题区,以像素为单位。
SM_CYCURSOR
14The游标高度,以像素为单位。该系统无法创建其他大小游标。
SM_CYDLGFRAME
8This值与SM_CYFIXEDFRAME相同。
SM_CYDOUBLECLK
37The高度周围的一首单击一个双击矩形序列的位置,以像素为单位。第二次的点击,必须发生在由SM_CXDOUBLECLK和SM_CYDOUBLECLK界定的系统考虑的两个点击一个双击矩形。点击这两个发生在还必须在指定的时间。
要设置双击矩形的高度,呼吁SystemParametersInfo与SPI_SETDOUBLECLKHEIGHT。
SM_CYDRAG
69The以上像素数量及以下鼠标向下一点,可以移动鼠标指针拖动操作前开始。这允许用户点击并释放没有无意中开始拖动操作鼠标按钮容易。如果此值为负,这是减去以上下拉点鼠标和它下面的补充。
SM_CYEDGE
第四十六高度三维边界像素。这是三维SM_CYBORDER对应。
SM_CYFIXEDFRAME
8The厚度周围的一个窗口,有一个标题,但没有相当大的像素,周边框架。 SM_CXFIXEDFRAME是横向边界的高度,SM_CYFIXEDFRAME是垂直边框的宽度。
此值为SM_CYDLGFRAME相同。
SM_CYFOCUSBORDER
84The高度由DrawFocusRect得出的焦点矩形的顶部和底部边缘。此值是在像素。
Windows 2000中:此值不支持。
SM_CYFRAME
33This值与SM_CYSIZEFRAME相同。
SM_CYFULLSCREEN
17The高度客户区的一个全面的主显示屏屏幕窗口,以像素为单位。为了获取屏幕的一部分坐标系统不能应用程序任务栏或桌面工具栏模糊,请与SPI_GETWORKAREA值使用SystemParametersInfo函数。
SM_CYHSCROLL
3The高度Level滚动条,以像素为单位。
SM_CYICON
第十二一个图标默认高度,以像素为单位。该LoadIcon函数可以加载的尺寸只有图标SM_CXICON和SM_CYICON。
SM_CYICONSPACING
39The高度为大图标视图项目的网格单元,以像素为单位。每个项目放置到一个大小SM_CYICONSPACING的安排SM_CXICONSPACING时矩形。此值总是大于或等于SM_CYICON。
SM_CYKANJIWINDOW
18For双字节字符集的系统版本,这是对汉字的窗口在屏幕底部像素,高度。
SM_CYMAXIMIZED
62The默认高度,以像素为最大化的顶层窗口在主显示屏。
SM_CYMAXTRACK
60The默认的一个窗口,有一个标题,尺寸边界像素,最大高度。该指标指的是整个桌面。用户不能拖动窗框到这些方面比大小。一个窗口可以覆盖处理WM_GETMINMAXINFO消息此值。
SM_CYMENU
第十五高度单行菜单栏,以像素为单位。
SM_CYMENUCHECK
72The高度默认的菜单检查标记位图,以像素为单位。
SM_CYMENUSIZE
55The高度,如子窗口的关闭按钮,在多文档界面用于像素的菜单栏按钮。
SM_CYMIN
29The的最低高度为一个窗口,以像素为单位。
SM_CYMINIMIZED
58The高度最小化窗口,以像素为单位。
SM_CYMINSPACING
48The高度为最小化窗口网格单元,以像素为单位。每一个最小化的窗口放置到一个矩形排列时,这种规模的。此值总是大于或等于SM_CYMINIMIZED。
SM_CYMINTRACK
35The一个窗口最小追踪的高度,以像素为单位。用户不能拖动窗框为比这些更小的尺寸大小。一个窗口可以覆盖处理WM_GETMINMAXINFO消息此值。
SM_CYSCREEN
1The高度的主显示屏的屏幕,像素为单位。这是相同的值通过调用GetDeviceCaps获得如下:GetDeviceCaps(hdcPrimaryMonitor,VERTRES)。
SM_CYSIZE
31The高度的按钮在窗口的标题或标题栏,以像素为单位。
SM_CYSIZEFRAME
33The厚度周围的一个窗口,可以在像素大小,周长尺寸边界。 SM_CXSIZEFRAME是Level边框宽度,SM_CYSIZEFRAME是边界的垂直高度。
此值为SM_CYFRAME相同。
SM_CYSMCAPTION
51The高度小标题,以像素为单位。
SM_CYSMICON
50The建议高度一个小图标,以像素为单位。小图标通常显示在窗口的标题和小图标视图。
SM_CYSMSIZE
53The高度小标题按钮,以像素为单位。
SM_CYVIRTUALSCREEN
79The高度的虚拟屏幕,像素为单位。这种虚拟屏幕是所有显示器边框。该SM_YVIRTUALSCREEN度量是对虚拟屏幕上方的坐标。
SM_CYVSCROLL
20The高度箭头位图上的垂直滚动条,以像素为单位。
SM_CYVTHUMB
9The高度拇指框垂直滚动条,以像素为单位。
SM_DBCSENABLED
42Nonzero如果USER32.DLL的支持DBCS,否则,0。
SM_DEBUG
22Nonzero如果版本的User.exe安装调试,否则,0。
SM_DIGITIZER
94Nonzero如果当前操作系统是Windows 7或Windows Server 2008 R2和Tablet PC输入服务已启动,否则,0。返回值是一个位掩码,指定了设备支持的数字化输入类型。有关更多信息,请参见备注。
Windows Server 2008中,Windows Vista和Windows XP/2000操作系统:此值不支持。
SM_IMMENABLED
82Nonzero如果输入法管理器/输入法编辑器功能被启用,否则0。
SM_IMMENABLED指示系统是否已准备好上使用Unicode应用程序的Unicode为基础的输入法。为了确保一个与语言相关的输入法的工程,检查SM_DBCSENABLED和系统ANSI代码页。否则的ANSI到Unicode转换可能无法正确执行,或如字体或注册表设置的某些组件可能不存在。
SM_MAXIMUMTOUCHES
95Nonzero如果在系统数字化仪,否则,0。
SM_MAXIMUMTOUCHES返回由系统中的每个数字化支持的联系人数量的上限累计最高金额。如果系统只有一个触摸数字化仪,返回值为1。如果系统有多点触摸数字化仪,返回值是同时接触的硬件可提供数量。
Windows Server 2008中,Windows Vista和Windows XP/2000操作系统:此值不支持。
SM_MEDIACENTER
87Nonzero如果当前操作系统是Windows XP的媒体中心版,如果不是0。
SM_MENUDROPALIGNMENT
40Nonzero如果下拉菜单是正确的,与相应的菜单对齐栏项目; 0如果菜单左对齐。
SM_MIDEASTENABLED
74Nonzero如果系统是希伯来文和阿拉伯文写成,0如果不启用。
SM_MOUSEPRESENT
19Nonzero如果安装了鼠标,否则,0。此值是很少为零,因为虚拟老鼠支持,因为有些系统的检测,而不是一个鼠标存在端口的存在。
SM_MOUSEHORIZONTALWHEELPRESENT
91Nonzero如果一个有Level滚动滚轮鼠标安装,否则0。
SM_MOUSEWHEELPRESENT
75Nonzero如果一个有垂直滚动滚轮鼠标安装,否则0。
SM_NETWORK
63The最低有效位被设置,如果一个网络是否存在,否则将被清除。其他位保留供将来使用。
SM_PENWINDOWS
41Nonzero如果为笔计算扩展的Microsoft Windows安装,否则为0。
SM_REMOTECONTROL
0x2001This系统度量是在终端服务环境中使用。它的值是非零,如果本届会议是远程控制,否则,0。
SM_REMOTESESSION
0x1000This系统度量是在终端服务环境中使用。如果调用过程是与终端服务客户端会话相关联,则返回值为非零。如果调用过程与终端服务相关的控制台会话,返回值为0。
Windows Server 2003和Windows XP中:在控制台会话不一定是物理控制台。有关更多信息,请参阅WTSGetActiveConsoleSessionId。
SM_SAMEDISPLAYFORMAT
81Nonzero如果所有的显示器具有相同的颜色格式,否则,0。两个显示器可以有相同的位深度,但不同的颜色格式。例如,红,绿,蓝像素,可与不同的数字编码的位数,或那些位可以在一个像素的颜色值不同地点。
SM_SECURE
44This系统度量应该被忽略,它总是返回0。
SM_SERVERR2
89The版本号,如果系统是Windows Server 2003 R2的,否则,0。
SM_SHOWSOUNDS
70Nonzero如果用户需要的应用情况的资料,目前在视觉上的地方,否则目前,只有在听取形式的资料,否则,0。
SM_SHUTTINGDOWN
0x2000Nonzero如果本届会议是关闭,否则,0。
Windows 2000中:此值不支持。
SM_SLOWMACHINE
73Nonzero如果计算机有一个低端(慢)处理器,否则,0。
SM_STARTER
88Nonzero如果当前操作系统是Windows 7精简版,Windows Vista Starter的,或Windows XP的精简版,否则,0。
SM_SWAPBUTTON
23Nonzero如果左,右鼠标按钮的含义进行交换,否则,0。
SM_TABLETPC
86Nonzero如果当前操作系统是Windows XP Tablet PC版本,或者如果当前操作系统是Windows Vista或Windows 7和Tablet PC输入服务已启动,否则,0。在SM_DIGITIZER设置指示由运行Windows 7或Windows Server 2008 R2的设备支持的数字化输入类型。有关更多信息,请参见备注。
SM_XVIRTUALSCREEN
76The坐标的虚拟屏幕的左侧。这种虚拟屏幕是所有显示器边框。该SM_CXVIRTUALSCREEN度量的虚拟屏幕的宽度。
SM_YVIRTUALSCREEN
77The坐标的虚拟屏幕的顶部。这种虚拟屏幕是所有显示器边框。该SM_CYVIRTUALSCREEN度量的虚拟屏幕的高度。
返回值
如果函数成功,返回值是要求系统公制或配置设置。
如果函数失败,返回值为0。 GetLastError函数不提供扩展的错误信息。
备注
系统的数据,能显示不同的显示。
GetSystemMetrics(SM_CMONITORS)计数仅可见显示器。这不同于EnumDisplayMonitors,其中列举了有形和无形的显示器伪镜像是与司机有关的显示器。无形的伪显示器与伪用于远程镜像或其他用途的申请绘图设备。
在SM_ARRANGE设置指定系统如何安排最小化的窗口,和一起始位置和方向组成。起始位置可以是下列值之一。
ValueMeaning
ARW_BOTTOMLEFTStart在屏幕左下角。默认的位置。
ARW_BOTTOMRIGHTStart较低,在屏幕的右上角。相当于ARW_STARTRIGHT。
ARW_TOPLEFTStart在屏幕的左上角。相当于ARW_STARTTOP。
ARW_TOPRIGHTStart在上层屏幕的右上角。相当于ARW_STARTTOP | SRW_STARTRIGHT。
在其中安排最小化的窗口可以是下列值之一方向。
ValueMeaning
ARW_DOWNArrange垂直,从上到下。
ARW_HIDEHide最小化窗口通过移动送行屏幕的可视区域。
ARW_LEFTArrangeLevel,从左到右。
ARW_RIGHTArrangeLevel,从右到左。
ARW_UPArrange垂直,自下而上。
在SM_DIGITIZER设置指定正在运行Windows 7或Windows Server 2008 R2的设备安装数字化的类型。返回值是一个位掩码,指定一个或多个下列值。
ValueMeaning
NID_INTEGRATED_TOUCH
0x01The设备具有集成触摸数字化仪。
NID_EXTERNAL_TOUCH
0x02The设备有一个外部触摸数字化仪。
NID_INTEGRATED_PEN
0x04The器件集成了一个笔数字化仪。
NID_EXTERNAL_PEN
0x08The设备有一个外部笔数字化仪。
NID_MULTI_INPUT
0x40The设备支持数字化仪输入多种来源。
NID_READY
0x80The设备准备好接收数字化仪输入。
实例
有关示例,请参见获取硬件信息。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
参见
EnumDisplayMonitors
系统信息功能
SystemParametersInfo
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetSystemMetrics Function
Retrieves the specified system metric or system configuration setting.
Note that all dimensions retrieved by GetSystemMetrics are in pixels.
Syntax
C++
int WINAPI GetSystemMetrics(
__in int nIndex
);
Parameters
nIndex [in]
The system metric or configuration setting to be retrieved. This parameter can be one of the following values. Note that all SM_CX* values are widths and all SM_CY* values are heights. Also note that all settings designed to return Boolean data represent TRUE as any nonzero value, and FALSE as a zero value.
ValueMeaning
SM_ARRANGE
56The flags that specify how the system arranged minimized windows. For more information, see the Remarks section in this topic.
SM_CLEANBOOT
67The value that specifies how the system is started:
0 Normal boot
1 Fail-safe boot
2 Fail-safe with network boot
A fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup files.
SM_CMONITORS
80The number of display monitors on a desktop. For more information, see the Remarks section in this topic.
SM_CMOUSEBUTTONS
43The number of buttons on a mouse, or zero if no mouse is installed.
SM_CXBORDER
5The width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look.
SM_CXCURSOR
13The width of a cursor, in pixels. The system cannot create cursors of other sizes.
SM_CXDLGFRAME
7This value is the same as SM_CXFIXEDFRAME.
SM_CXDOUBLECLK
36The width of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must occur within the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click. The two clicks must also occur within a specified time.
To set the width of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKWIDTH.
SM_CXDRAG
68The number of pixels on either side of a mouse-down point that the mouse pointer can move before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is negative, it is subtracted from the left of the mouse-down point and added to the right of it.
SM_CXEDGE
45The width of a 3-D border, in pixels. This metric is the 3-D counterpart of SM_CXBORDER.
SM_CXFIXEDFRAME
7The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border.
This value is the same as SM_CXDLGFRAME.
SM_CXFOCUSBORDER
83The width of the left and right edges of the focus rectangle that the DrawFocusRect draws. This value is in pixels.
Windows 2000: This value is not supported.
SM_CXFRAME
32This value is the same as SM_CXSIZEFRAME.
SM_CXFULLSCREEN
16The width of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen that is not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.
SM_CXHSCROLL
21The width of the arrow bitmap on a horizontal scroll bar, in pixels.
SM_CXHTHUMB
10The width of the thumb box in a horizontal scroll bar, in pixels.
SM_CXICON
11The default width of an icon, in pixels. The LoadIcon function can load only icons with the dimensions that SM_CXICON and SM_CYICON specifies.
SM_CXICONSPACING
38The width of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CXICON.
SM_CXMAXIMIZED
61The default width, in pixels, of a maximized top-level window on the primary display monitor.
SM_CXMAXTRACK
59The default maximum width of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message.
SM_CXMENUCHECK
71The width of the default menu check-mark bitmap, in pixels.
SM_CXMENUSIZE
54The width of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels.
SM_CXMIN
28The minimum width of a window, in pixels.
SM_CXMINIMIZED
57The width of a minimized window, in pixels.
SM_CXMINSPACING
47The width of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. This value is always greater than or equal to SM_CXMINIMIZED.
SM_CXMINTRACK
34The minimum tracking width of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message.
SM_CXPADDEDBORDER
92The amount of border padding for captioned windows, in pixels.
Windows XP/2000: This value is not supported.
SM_CXSCREEN
0The width of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, HORZRES).
SM_CXSIZE
30The width of a button in a window caption or title bar, in pixels.
SM_CXSIZEFRAME
32The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
This value is the same as SM_CXFRAME.
SM_CXSMICON
49The recommended width of a small icon, in pixels. Small icons typically appear in window captions and in small icon view.
SM_CXSMSIZE
52The width of small caption buttons, in pixels.
SM_CXVIRTUALSCREEN
78The width of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN metric is the coordinates for the left side of the virtual screen.
SM_CXVSCROLL
2The width of a vertical scroll bar, in pixels.
SM_CYBORDER
6The height of a window border, in pixels. This is equivalent to the SM_CYEDGE value for windows with the 3-D look.
SM_CYCAPTION
4The height of a caption area, in pixels.
SM_CYCURSOR
14The height of a cursor, in pixels. The system cannot create cursors of other sizes.
SM_CYDLGFRAME
8This value is the same as SM_CYFIXEDFRAME.
SM_CYDOUBLECLK
37The height of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must occur within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for the system to consider the two clicks a double-click. The two clicks must also occur within a specified time.
To set the height of the double-click rectangle, call SystemParametersInfo with SPI_SETDOUBLECLKHEIGHT.
SM_CYDRAG
69The number of pixels above and below a mouse-down point that the mouse pointer can move before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. If this value is negative, it is subtracted from above the mouse-down point and added below it.
SM_CYEDGE
46The height of a 3-D border, in pixels. This is the 3-D counterpart of SM_CYBORDER.
SM_CYFIXEDFRAME
8The thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the height of the horizontal border, and SM_CYFIXEDFRAME is the width of the vertical border.
This value is the same as SM_CYDLGFRAME.
SM_CYFOCUSBORDER
84The height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. This value is in pixels.
Windows 2000: This value is not supported.
SM_CYFRAME
33This value is the same as SM_CYSIZEFRAME.
SM_CYFULLSCREEN
17The height of the client area for a full-screen window on the primary display monitor, in pixels. To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.
SM_CYHSCROLL
3The height of a horizontal scroll bar, in pixels.
SM_CYICON
12The default height of an icon, in pixels. The LoadIcon function can load only icons with the dimensions SM_CXICON and SM_CYICON.
SM_CYICONSPACING
39The height of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of size SM_CXICONSPACING by SM_CYICONSPACING when arranged. This value is always greater than or equal to SM_CYICON.
SM_CYKANJIWINDOW
18For double byte character set versions of the system, this is the height of the Kanji window at the bottom of the screen, in pixels.
SM_CYMAXIMIZED
62The default height, in pixels, of a maximized top-level window on the primary display monitor.
SM_CYMAXTRACK
60The default maximum height of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message.
SM_CYMENU
15The height of a single-line menu bar, in pixels.
SM_CYMENUCHECK
72The height of the default menu check-mark bitmap, in pixels.
SM_CYMENUSIZE
55The height of menu bar buttons, such as the child window close button that is used in the multiple document interface, in pixels.
SM_CYMIN
29The minimum height of a window, in pixels.
SM_CYMINIMIZED
58The height of a minimized window, in pixels.
SM_CYMINSPACING
48The height of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. This value is always greater than or equal to SM_CYMINIMIZED.
SM_CYMINTRACK
35The minimum tracking height of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. A window can override this value by processing the WM_GETMINMAXINFO message.
SM_CYSCREEN
1The height of the screen of the primary display monitor, in pixels. This is the same value obtained by calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES).
SM_CYSIZE
31The height of a button in a window caption or title bar, in pixels.
SM_CYSIZEFRAME
33The thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
This value is the same as SM_CYFRAME.
SM_CYSMCAPTION
51The height of a small caption, in pixels.
SM_CYSMICON
50The recommended height of a small icon, in pixels. Small icons typically appear in window captions and in small icon view.
SM_CYSMSIZE
53The height of small caption buttons, in pixels.
SM_CYVIRTUALSCREEN
79The height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The SM_YVIRTUALSCREEN metric is the coordinates for the top of the virtual screen.
SM_CYVSCROLL
20The height of the arrow bitmap on a vertical scroll bar, in pixels.
SM_CYVTHUMB
9The height of the thumb box in a vertical scroll bar, in pixels.
SM_DBCSENABLED
42Nonzero if User32.dll supports DBCS; otherwise, 0.
SM_DEBUG
22Nonzero if the debug version of User.exe is installed; otherwise, 0.
SM_DIGITIZER
94Nonzero if the current operating system is Windows 7 or Windows Server 2008 R2 and the Tablet PC Input service is started; otherwise, 0. The return value is a bit mask that specifies the type of digitizer input supported by the device. For more information, see Remarks.
Windows Server 2008, Windows Vista, and Windows XP/2000: This value is not supported.
SM_IMMENABLED
82Nonzero if Input Method Manager/Input Method Editor features are enabled; otherwise, 0.
SM_IMMENABLED indicates whether the system is ready to use a Unicode-based IME on a Unicode application. To ensure that a language-dependent IME works, check SM_DBCSENABLED and the system ANSI code page. Otherwise the ANSI-to-Unicode conversion may not be performed correctly, or some components like fonts or registry settings may not be present.
SM_MAXIMUMTOUCHES
95Nonzero if there are digitizers in the system; otherwise, 0.
SM_MAXIMUMTOUCHES returns the aggregate maximum of the maximum number of contacts supported by every digitizer in the system. If the system has only single-touch digitizers, the return value is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.
Windows Server 2008, Windows Vista, and Windows XP/2000: This value is not supported.
SM_MEDIACENTER
87Nonzero if the current operating system is the Windows XP, Media Center Edition, 0 if not.
SM_MENUDROPALIGNMENT
40Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; 0 if the menus are left-aligned.
SM_MIDEASTENABLED
74Nonzero if the system is enabled for Hebrew and Arabic languages, 0 if not.
SM_MOUSEPRESENT
19Nonzero if a mouse is installed; otherwise, 0. This value is rarely zero, because of support for virtual mice and because some systems detect the presence of the port instead of the presence of a mouse.
SM_MOUSEHORIZONTALWHEELPRESENT
91Nonzero if a mouse with a horizontal scroll wheel is installed; otherwise 0.
SM_MOUSEWHEELPRESENT
75Nonzero if a mouse with a vertical scroll wheel is installed; otherwise 0.
SM_NETWORK
63The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use.
SM_PENWINDOWS
41Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise.
SM_REMOTECONTROL
0x2001This system metric is used in a Terminal Services environment. Its value is nonzero if the current session is remotely controlled; otherwise, 0.
SM_REMOTESESSION
0x1000This system metric is used in a Terminal Services environment. If the calling process is associated with a Terminal Services client session, the return value is nonzero. If the calling process is associated with the Terminal Services console session, the return value is 0.
Windows Server 2003 and Windows XP: The console session is not necessarily the physical console. For more information, see WTSGetActiveConsoleSessionId .
SM_SAMEDISPLAYFORMAT
81Nonzero if all the display monitors have the same color format, otherwise, 0. Two displays can have the same bit depth, but different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those bits can be located in different places in a pixel color value.
SM_SECURE
44This system metric should be ignored; it always returns 0.
SM_SERVERR2
89The build number if the system is Windows Server 2003 R2; otherwise, 0.
SM_SHOWSOUNDS
70Nonzero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; otherwise, 0.
SM_SHUTTINGDOWN
0x2000Nonzero if the current session is shutting down; otherwise, 0.
Windows 2000: This value is not supported.
SM_SLOWMACHINE
73Nonzero if the computer has a low-end (slow) processor; otherwise, 0.
SM_STARTER
88Nonzero if the current operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition; otherwise, 0.
SM_SWAPBUTTON
23Nonzero if the meanings of the left and right mouse buttons are swapped; otherwise, 0.
SM_TABLETPC
86Nonzero if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista or Windows 7 and the Tablet PC Input service is started; otherwise, 0. The SM_DIGITIZER setting indicates the type of digitizer input supported by a device running Windows 7 or Windows Server 2008 R2. For more information, see Remarks.
SM_XVIRTUALSCREEN
76The coordinates for the left side of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CXVIRTUALSCREEN metric is the width of the virtual screen.
SM_YVIRTUALSCREEN
77The coordinates for the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CYVIRTUALSCREEN metric is the height of the virtual screen.

Return Value
If the function succeeds, the return value is the requested system metric or configuration setting.
If the function fails, the return value is 0. GetLastError does not provide extended error information.
Remarks
System metrics can vary from display to display.
GetSystemMetrics(SM_CMONITORS) counts only visible display monitors. This is different from EnumDisplayMonitors , which enumerates both visible display monitors and invisible pseudo-monitors that are associated with mirroring drivers. An invisible pseudo-monitor is associated with a pseudo-device used to mirror application drawing for remoting or other purposes.
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.
ValueMeaning
ARW_BOTTOMLEFTStart at the lower-left corner of the screen. The default position.
ARW_BOTTOMRIGHTStart at the lower-right corner of the screen. Equivalent to ARW_STARTRIGHT.
ARW_TOPLEFTStart at the upper-left corner of the screen. Equivalent to ARW_STARTTOP.
ARW_TOPRIGHTStart at the upper-right corner of the screen. Equivalent to ARW_STARTTOP | SRW_STARTRIGHT.

The direction in which to arrange minimized windows can be one of the following values.
ValueMeaning
ARW_DOWNArrange vertically, top to bottom.
ARW_HIDEHide minimized windows by moving them off the visible area of the screen.
ARW_LEFTArrange horizontally, left to right.
ARW_RIGHTArrange horizontally, right to left.
ARW_UPArrange vertically, bottom to top.

The SM_DIGITIZER setting specifies the type of digitizers that are installed on a device running Windows 7 or Windows Server 2008 R2. The return value is a bit mask that specifies one or more of the following values.
ValueMeaning
NID_INTEGRATED_TOUCH
0x01The device has an integrated touch digitizer.
NID_EXTERNAL_TOUCH
0x02The device has an external touch digitizer.
NID_INTEGRATED_PEN
0x04The device has an integrated pen digitizer.
NID_EXTERNAL_PEN
0x08The device has an external pen digitizer.
NID_MULTI_INPUT
0x40The device supports multiple sources of digitizer input.
NID_READY
0x80The device is ready to receive digitizer input.

Examples
For an example, see Getting Hardware Information .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
See Also
EnumDisplayMonitors
System Information Functions
SystemParametersInfo
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724385(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:17:43