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

来源:互联网 发布:ubuntu grub-efi 编辑:程序博客网 时间:2024/04/29 13:54

所有跟系统中默认控件的长宽值相关的,请查阅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 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_CXHSCROLL
21 Width of the arrow bitmap on a horizontal scroll bar, in pixels.
SM_CXHTHUMB
10 Width of the thumb box in a horizontal scroll bar, in pixels.
SM_CXICON
11 Default width of an icon, in pixels. The LoadIcon function can load only icons with the dimensions
specified by SM_CXICON and SM_CYICON. 
SM_CXICONSPACING
38 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
61 Default width, in pixels, of a maximized top-level window on the primary display monitor.
SM_CXMAXTRACK
59 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
71 Width of the default menu check-mark bitmap, in pixels.
SM_CXMENUSIZE
54 Width of menu bar buttons, such as the child window close button used in the multiple document
interface, in pixels. 
SM_CXMIN
28 Minimum width of a window, in pixels.
SM_CXMINIMIZED
57 Width of a minimized window, in pixels.
SM_CXMINSPACING
47 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
34 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_CXSCREEN
0 Width of the screen of the primary display monitor, in pixels. This is the same values obtained by
calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, HORZRES). 
SM_CXSIZE
30 Width of a button in a window's caption or title bar, in pixels.
SM_CXSIZEFRAME
32 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. 
Same as SM_CXFRAME.
 
SM_CXSMICON
49 Recommended width of a small icon, in pixels. Small icons typically appear in window captions and in
small icon view. 
SM_CXSMSIZE
52 Width of small caption buttons, in pixels.
SM_CXVIRTUALSCREEN
76 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 of the top of the virtual screen. 
Windows NT and Windows 95:  This value is not supported.
SM_CXVSCROLL
20 Width of a vertical scroll bar, in pixels.
SM_CYBORDER
6 Height of a window border, in pixels. This is equivalent to the SM_CYEDGE value for windows with the 3-D
look.  
SM_CYCAPTION
4 Height of a caption area, in pixels.
SM_CYCURSOR
14 Height of a cursor, in pixels. The system cannot create cursors of other sizes.
SM_CYDLGFRAME
8 Same as SM_CYFIXEDFRAME.
SM_CYDOUBLECLK
37 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
69 Height of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before
a drag operation begins. This value is in pixels. It allows the user to click and release the mouse button 
easily without unintentionally starting a drag operation. 
SM_CYEDGE
46 Height of a 3-D border, in pixels. This is the 3-D counterpart of SM_CYBORDER.
SM_CYFIXEDFRAME
8 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_CYDLGFRAME.
 
SM_CYFOCUSBORDER
84 Height of the top and bottom 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_CYFRAME
33 Same as SM_CYSIZEFRAME.
SM_CYFULLSCREEN
17 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
3 Height of a horizontal scroll bar, in pixels.
SM_CYICON
12 Default height of an icon, in pixels. The LoadIcon function can load only icons with the dimensions
SM_CXICON and SM_CYICON. 
SM_CYICONSPACING
39 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
18 For 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
62 Default height, in pixels, of a maximized top-level window on the primary display monitor.
 
SM_CYMAXTRACK
60 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
15 Height of a single-line menu bar, in pixels.
SM_CYMENUCHECK
72 Height of the default menu check-mark bitmap, in pixels.
SM_CYMENUSIZE
55 Height of menu bar buttons, such as the child window close button used in the multiple document
interface, in pixels. 
SM_CYMIN
29 Minimum height of a window, in pixels.
 
SM_CYMINIMIZED
58 Height of a minimized window, in pixels.
SM_CYMINSPACING
48 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
35 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
1 Height of the screen of the primary display monitor, in pixels. This is the same values obtained by
calling GetDeviceCaps as follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES). 
SM_CYSIZE
1 Height of a button in a window's caption or title bar, in pixels.
SM_CYSIZEFRAME
33 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. 
Same as SM_CYFRAME.
 
SM_CYSMCAPTION
51 Height of a small caption, in pixels.
SM_CYSMICON
50 Recommended height of a small icon, in pixels. Small icons typically appear in window captions and in
small icon view. 
SM_CYSMSIZE
53 Height of small caption buttons, in pixels.
SM_CYVIRTUALSCREEN
77 Height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display
monitors. The SM_YVIRTUALSCREEN metric is the coordinate of the left side of the virtual screen. 
Windows NT and Windows 95:  This value is not supported.
SM_CYVSCROLL
20 Height of the arrow bitmap on a vertical scroll bar, in pixels.
SM_CYVTHUMB
9 Height of the thumb box in a vertical scroll bar, in pixels.
SM_DBCSENABLED
42 Nonzero if User32.dll supports DBCS; zero otherwise.
Windows Me/98/95:  Nonzero if the double-byte character-set (DBCS) version of User.exe is installed; zero
otherwise. 
SM_DEBUG
22 Nonzero if the debug version of User.exe is installed; zero otherwise.
SM_IMMENABLED
82 Nonzero if Input Method Manager/Input Method Editor features are enabled; zero otherwise.
Windows NT and Windows Me/98/95:  This value is not supported.
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 
setting may not be present. 
 
SM_MEDIACENTER
87 Nonzero if the current operating system is the Windows XP, Media Center Edition, zero if not.
SM_MENUDROPALIGNMENT
40 Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; zero if the menus are
left-aligned. 
SM_MIDEASTENABLED
74 Nonzero if the system is enabled for Hebrew and Arabic languages, zero if not.
 
SM_MOUSEPRESENT
 Nonzero if a mouse is installed; zero otherwise. 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_MOUSEWHEELPRESENT
19 Nonzero if a mouse with a wheel is installed; zero otherwise.
Windows NT 3.51 and earlier and Windows 95:  This value is not supported.
SM_NETWORK
63 Least significant bit is set if a network is present; otherwise, it is cleared. The other bits are
reserved for future use. 
SM_PENWINDOWS
41 Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise.
SM_REMOTECONTROL
0x2001 This system metric is used in a Terminal Services environment. Its value is nonzero if the current
session is remotely controlled; zero otherwise. 
Windows 2000/NT and Windows Me/98/95:  This value is not supported.
SM_REMOTESESSION
0x1000 This 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 Server console session, the return value is zero. The console session is not necessarily 
the physical console - see WTSGetActiveConsoleSessionId for more information. 
Windows NT 4.0 SP3 and earlier and Windows Me/98/95:  This value is not supported.
 
SM_SECURE
44 Nonzero if security is present; zero otherwise.
SM_SAMEDISPLAYFORMAT
81 Nonzero if all the display monitors have the same color format, zero otherwise. Note that 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's 
color value. 
Windows NT and Windows 95:  This value is not supported.
SM_SHOWSOUNDS
70 Nonzero if the user requires an application to present information visually in situations where it would
otherwise present the information only in audible form; zero otherwise.  
SM_SHUTTINGDOWN
0x2000 Nonzero if the current session is shutting down; zero otherwise.
Windows 2000/NT and Windows Me/98/95:  This value is not supported.
SM_SLOWMACHINE
73 Nonzero if the computer has a low-end (slow) processor; zero otherwise.
SM_SWAPBUTTON
23 Nonzero if the meanings of the left and right mouse buttons are swapped; zero otherwise.
SM_TABLETPC
86 Nonzero if the current operating system is the Windows XP Tablet PC edition, zero if not.
 
SM_XVIRTUALSCREEN
76 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. 
Windows NT and Windows 95:  This value is not supported.
SM_YVIRTUALSCREEN
77 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. 
Windows NT and Windows 95:  This value is not supported.
原创粉丝点击