PC Camera开发日志(二十二)------ 系统中控件默认的长宽值

本文介绍了如何使用GetSystemMetrics函数获取Windows系统中控件的默认长宽值,包括系统配置设置和显示元素的像素尺寸。内容来源于VS2005的MSDN文档。
摘要由CSDN通过智能技术生成

所有跟系统中默认控件的长宽值相关的,请查阅GetSystemMetrics这个函数。

以下信息摘自vs2005的MSDN2005 documents.

GetSystemMetrics

The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements) and system configuration settings. All dimensions retrieved by GetSystemMetrics are in pixels.

int GetSystemMetrics(
  int nIndex
);
Parameters
nIndex
[in] System metric or configuration setting to retrieve. 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. 
SM_ARRANGE
56 Flags specifying how the system arranged minimized windows. For more information about minimized
windows, see the following Remarks section.  
SM_CLEANBOOT
67 Value that specifies how the system was started:
0 Normal boot
1 Fail-safe boot
2 Fail-safe with network boot
Fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user's startup files.
 
SM_CMONITORS
80 Number of display monitors on the desktop. See Remarks for more information.
Windows NT and Windows 95:  This value is not supported.
SM_CMOUSEBUTTONS
43 Number of buttons on mouse, or zero if no mouse is installed.
SM_CXBORDER
5 Width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D
look.  
SM_CXCURSOR
13 Width of a cursor, in pixels. The system cannot create cursors of other sizes.
SM_CXDLGFRAME
7 Same as SM_CXFIXEDFRAME.
SM_CXDOUBLECLK
36 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 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
68 Width of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before
a drag operation begins, in pixels. It allows the user to click and release the mouse button easily without 
unintentionally starting a drag operation. 
SM_CXEDGE
45 Width of a 3-D border, in pixels. This is the 3-D counterpart of SM_CXBORDER.
SM_CXFIXEDFRAME
7 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. 
Same as SM_CXDLGFRAME.
 
SM_CXFOCUSBORDER
83 Width of the left and right edges of the focus rectangle drawn by DrawFocusRect. This value is in
pixels. 
Windows 2000/NT and Windows Me/98/95:  This value is not supported.
SM_CXFRAME
32 Same as SM_CXSIZEFRAME.
SM_CXFULLSCREEN
16 Width of the client area for a full-screen window on
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值