所有跟系统中默认控件的长宽值相关的,请查阅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