13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="getsystemmetrics" xml:lang="en">
15
<refname>getsystemmetrics</refname>
16
<refpurpose>Retrieves the specified system metric or system configuration
17
setting (Windows only)
21
<title>Calling Sequence</title>
22
<synopsis>res = getsystemmetrics(key)</synopsis>
25
<title>Arguments</title>
30
<para>a value (integer)</para>
36
<para>a string (see below)</para>
42
<title>Description</title>
43
<para>Retrieves the specified system metric or system configuration
46
<informaltable border="1">
49
<td>The flags that specify how the system arranged minimized windows.
50
For more information, see the Remarks section in this topic.
55
<td>The value that specifies how the system is started: 0 Normal boot
56
1 Fail-safe boot 2 Fail-safe with network boot A fail-safe boot (also
57
called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup
63
<td>The number of display monitors on a desktop. For more information,
64
see the Remarks section in this topic.
68
<td>SM_CMOUSEBUTTONS</td>
69
<td>The number of buttons on a mouse, or zero if no mouse is
75
<td>The width of a window border, in pixels. This is equivalent to the
76
SM_CXEDGE value for windows with the 3-D look.
81
<td>The width of a cursor, in pixels. The system cannot create cursors
86
<td>SM_CXDLGFRAME</td>
87
<td>This value is the same as SM_CXFIXEDFRAME.</td>
90
<td>SM_CXDOUBLECLK</td>
91
<td>The width of the rectangle around the location of a first click in
92
a double-click sequence, in pixels. The second click must occur within
93
the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
94
the system to consider the two clicks a double-click. The two clicks
95
must also occur within a specified time. To set the width of the
96
double-click rectangle, call SystemParametersInfo with
97
SPI_SETDOUBLECLKWIDTH.
102
<td>The number of pixels on either side of a mouse-down point that the
103
mouse pointer can move before a drag operation begins. This allows the
104
user to click and release the mouse button easily without
105
unintentionally starting a drag operation. If this value is negative,
106
it is subtracted from the left of the mouse-down point and added to
112
<td>The width of a 3-D border, in pixels. This metric is the 3-D
113
counterpart of SM_CXBORDER.
117
<td>SM_CXFIXEDFRAME</td>
118
<td>The thickness of the frame around the perimeter of a window that
119
has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
120
height of the horizontal border, and SM_CYFIXEDFRAME is the width of
121
the vertical border. This value is the same as SM_CXDLGFRAME.
125
<td>SM_CXFOCUSBORDER</td>
126
<td>The width of the left and right edges of the focus rectangle that
127
the DrawFocusRect draws. This value is in pixels.
132
<td>This value is the same as SM_CXSIZEFRAME.</td>
135
<td>SM_CXFULLSCREEN</td>
136
<td>The width of the client area for a full-screen window on the
137
primary display monitor, in pixels. To get the coordinates of the
138
portion of the screen that is not obscured by the system taskbar or by
139
application desktop toolbars, call the SystemParametersInfo function
140
with the SPI_GETWORKAREA value.
144
<td>SM_CXHSCROLL</td>
145
<td>The width of the arrow bitmap on a horizontal scroll bar, in
151
<td>The width of the thumb box in a horizontal scroll bar, in
157
<td>The default width of an icon, in pixels. The LoadIcon function can
158
load only icons with the dimensions that SM_CXICON and SM_CYICON
163
<td>SM_CXICONSPACING</td>
164
<td>The width of a grid cell for items in large icon view, in pixels.
165
Each item fits into a rectangle of size SM_CXICONSPACING by
166
SM_CYICONSPACING when arranged. This value is always greater than or
171
<td>SM_CXMAXIMIZED</td>
172
<td>The default width, in pixels, of a maximized top-level window on
173
the primary display monitor.
177
<td>SM_CXMAXTRACK</td>
178
<td>The default maximum width of a window that has a caption and
179
sizing borders, in pixels. This metric refers to the entire desktop.
180
The user cannot drag the window frame to a size larger than these
181
dimensions. A window can override this value by processing the
182
WM_GETMINMAXINFO message.
186
<td>SM_CXMENUCHECK</td>
187
<td>The width of the default menu check-mark bitmap, in pixels.</td>
190
<td>SM_CXMENUSIZE</td>
191
<td>The width of menu bar buttons, such as the child window close
192
button that is used in the multiple document interface, in
198
<td>The minimum width of a window, in pixels.</td>
201
<td>SM_CXMINIMIZED</td>
202
<td>The width of a minimized window, in pixels.</td>
205
<td>SM_CXMINSPACING</td>
206
<td>The width of a grid cell for a minimized window, in pixels. Each
207
minimized window fits into a rectangle this size when arranged. This
208
value is always greater than or equal to SM_CXMINIMIZED.
212
<td>SM_CXMINTRACK</td>
213
<td>The minimum tracking width of a window, in pixels. The user cannot
214
drag the window frame to a size smaller than these dimensions. A
215
window can override this value by processing the WM_GETMINMAXINFO
220
<td>SM_CXPADDEDBORDER</td>
221
<td>The amount of border padding for captioned windows, in
227
<td>The width of the screen of the primary display monitor, in pixels.
228
This is the same value obtained by calling GetDeviceCaps as follows:
229
GetDeviceCaps( hdcPrimaryMonitor, HORZRES).
234
<td>The width of a button in a window caption or title bar, in
239
<td>SM_CXSIZEFRAME</td>
240
<td>The thickness of the sizing border around the perimeter of a
241
window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
242
the horizontal border, and SM_CYSIZEFRAME is the height of the
243
vertical border. This value is the same as SM_CXFRAME.
248
<td>The recommended width of a small icon, in pixels. Small icons
249
typically appear in window captions and in small icon view.
254
<td>The width of small caption buttons, in pixels.</td>
257
<td>SM_CXVIRTUALSCREEN</td>
258
<td>The width of the virtual screen, in pixels. The virtual screen is
259
the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN
260
metric is the coordinates for the left side of the virtual
265
<td>SM_CXVSCROLL</td>
266
<td>The width of a vertical scroll bar, in pixels.</td>
270
<td>The height of a window border, in pixels. This is equivalent to
271
the SM_CYEDGE value for windows with the 3-D look.
275
<td>SM_CYCAPTION</td>
276
<td>The height of a caption area, in pixels.</td>
280
<td>The height of a cursor, in pixels. The system cannot create
281
cursors of other sizes.
285
<td>SM_CYDLGFRAME</td>
286
<td>This value is the same as SM_CYFIXEDFRAME.</td>
289
<td>SM_CYDOUBLECLK</td>
290
<td>The height of the rectangle around the location of a first click
291
in a double-click sequence, in pixels. The second click must occur
292
within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
293
the system to consider the two clicks a double-click. The two clicks
294
must also occur within a specified time. To set the height of the
295
double-click rectangle, call SystemParametersInfo with
296
SPI_SETDOUBLECLKHEIGHT.
301
<td>The number of pixels above and below a mouse-down point that the
302
mouse pointer can move before a drag operation begins. This allows the
303
user to click and release the mouse button easily without
304
unintentionally starting a drag operation. If this value is negative,
305
it is subtracted from above the mouse-down point and added below
311
<td>The height of a 3-D border, in pixels. This is the 3-D counterpart
316
<td>SM_CYFIXEDFRAME</td>
317
<td>The thickness of the frame around the perimeter of a window that
318
has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
319
height of the horizontal border, and SM_CYFIXEDFRAME is the width of
320
the vertical border. This value is the same as SM_CYDLGFRAME.
324
<td>SM_CYFOCUSBORDER</td>
325
<td>The height of the top and bottom edges of the focus rectangle
326
drawn by DrawFocusRect. This value is in pixels.
331
<td>This value is the same as SM_CYSIZEFRAME.</td>
334
<td>SM_CYFULLSCREEN</td>
335
<td>The height of the client area for a full-screen window on the
336
primary display monitor, in pixels. To get the coordinates of the
337
portion of the screen not obscured by the system taskbar or by
338
application desktop toolbars, call the SystemParametersInfo function
339
with the SPI_GETWORKAREA value.
343
<td>SM_CYHSCROLL</td>
344
<td>The height of a horizontal scroll bar, in pixels.</td>
348
<td>The default height of an icon, in pixels. The LoadIcon function
349
can load only icons with the dimensions SM_CXICON and SM_CYICON.
353
<td>SM_CYICONSPACING</td>
354
<td>The height of a grid cell for items in large icon view, in pixels.
355
Each item fits into a rectangle of size SM_CXICONSPACING by
356
SM_CYICONSPACING when arranged. This value is always greater than or
361
<td>SM_CYKANJIWINDOW</td>
362
<td>For double byte character set versions of the system, this is the
363
height of the Kanji window at the bottom of the screen, in
368
<td>SM_CYMAXIMIZED</td>
369
<td>The default height, in pixels, of a maximized top-level window on
370
the primary display monitor.
374
<td>SM_CYMAXTRACK</td>
375
<td>The default maximum height of a window that has a caption and
376
sizing borders, in pixels. This metric refers to the entire desktop.
377
The user cannot drag the window frame to a size larger than these
378
dimensions. A window can override this value by processing the
379
WM_GETMINMAXINFO message.
384
<td>The height of a single-line menu bar, in pixels.</td>
387
<td>SM_CYMENUCHECK</td>
388
<td>The height of the default menu check-mark bitmap, in pixels.</td>
391
<td>SM_CYMENUSIZE</td>
392
<td>The height of menu bar buttons, such as the child window close
393
button that is used in the multiple document interface, in
399
<td>The minimum height of a window, in pixels.</td>
402
<td>SM_CYMINIMIZED</td>
403
<td>The height of a minimized window, in pixels.</td>
406
<td>SM_CYMINSPACING</td>
407
<td>The height of a grid cell for a minimized window, in pixels. Each
408
minimized window fits into a rectangle this size when arranged. This
409
value is always greater than or equal to SM_CYMINIMIZED.
413
<td>SM_CYMINTRACK</td>
414
<td>The minimum tracking height of a window, in pixels. The user
415
cannot drag the window frame to a size smaller than these dimensions.
416
A window can override this value by processing the WM_GETMINMAXINFO
422
<td>The height of the screen of the primary display monitor, in
423
pixels. This is the same value obtained by calling GetDeviceCaps as
424
follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES).
429
<td>The height of a button in a window caption or title bar, in
434
<td>SM_CYSIZEFRAME</td>
435
<td>The thickness of the sizing border around the perimeter of a
436
window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
437
the horizontal border, and SM_CYSIZEFRAME is the height of the
438
vertical border. This value is the same as SM_CYFRAME.
442
<td>SM_CYSMCAPTION</td>
443
<td>The height of a small caption, in pixels.</td>
447
<td>The recommended height of a small icon, in pixels. Small icons
448
typically appear in window captions and in small icon view.
453
<td>The height of small caption buttons, in pixels.</td>
456
<td>SM_CYVIRTUALSCREEN</td>
457
<td>The height of the virtual screen, in pixels. The virtual screen is
458
the bounding rectangle of all display monitors. The SM_YVIRTUALSCREEN
459
metric is the coordinates for the top of the virtual screen.
463
<td>SM_CYVSCROLL</td>
464
<td>The height of the arrow bitmap on a vertical scroll bar, in
470
<td>The height of the thumb box in a vertical scroll bar, in
475
<td>SM_DBCSENABLED</td>
476
<td>Nonzero if User32.dll supports DBCS; otherwise, 0.</td>
480
<td>Nonzero if the debug version of User.exe is installed; otherwise,
485
<td>SM_IMMENABLED</td>
486
<td>Nonzero if Input Method Manager/Input Method Editor features are
487
enabled; otherwise, 0. SM_IMMENABLED indicates whether the system is
488
ready to use a Unicode-based IME on a Unicode application. To ensure
489
that a language-dependent IME works, check SM_DBCSENABLED and the
490
system ANSI code page. Otherwise the ANSI-to-Unicode conversion may
491
not be performed correctly, or some components like fonts or registry
492
settings may not be present.
496
<td>SM_MEDIACENTER</td>
497
<td>Nonzero if the current operating system is the Windows XP, Media
498
Center Edition, 0 if not.
502
<td>SM_MENUDROPALIGNMENT</td>
503
<td>Nonzero if drop-down menus are right-aligned with the
504
corresponding menu-bar item; 0 if the menus are left-aligned.
508
<td>SM_MIDEASTENABLED</td>
509
<td>Nonzero if the system is enabled for Hebrew and Arabic languages,
514
<td>SM_MOUSEPRESENT</td>
515
<td>Nonzero if a mouse is installed; otherwise, 0. This value is
516
rarely zero, because of support for virtual mice and because some
517
systems detect the presence of the port instead of the presence of a
522
<td>SM_MOUSEHORIZONTALWHEELPRESENT</td>
523
<td>Nonzero if a mouse with a horizontal scroll wheel is installed;
528
<td>SM_MOUSEWHEELPRESENT</td>
529
<td>Nonzero if a mouse with a vertical scroll wheel is installed;
535
<td>The least significant bit is set if a network is present;
536
otherwise, it is cleared. The other bits are reserved for future
541
<td>SM_PENWINDOWS</td>
542
<td>Nonzero if the Microsoft Windows for Pen computing extensions are
543
installed; zero otherwise.
547
<td>SM_REMOTECONTROL</td>
548
<td>This system metric is used in a Terminal Services environment. Its
549
value is nonzero if the current session is remotely controlled;
554
<td>SM_REMOTESESSION</td>
555
<td>This system metric is used in a Terminal Services environment. If
556
the calling process is associated with a Terminal Services client
557
session, the return value is nonzero. If the calling process is
558
associated with the Terminal Server console session, the return value
559
is 0. The console session is not necessarily the physical console. For
560
more information, see WTSGetActiveConsoleSessionId.
564
<td>SM_SAMEDISPLAYFORMAT</td>
565
<td>Nonzero if all the display monitors have the same color format,
566
otherwise, 0. Two displays can have the same bit depth, but different
567
color formats. For example, the red, green, and blue pixels can be
568
encoded with different numbers of bits, or those bits can be located
569
in different places in a pixel color value.
574
<td>This system metric should be ignored; it always returns 0.</td>
578
<td>The build number if the system is Windows Server 2003 R2;
583
<td>SM_SHOWSOUNDS</td>
584
<td>Nonzero if the user requires an application to present information
585
visually in situations where it would otherwise present the
586
information only in audible form; otherwise, 0.
590
<td>SM_SHUTTINGDOWN</td>
591
<td>Nonzero if the current session is shutting down; otherwise,
596
<td>SM_SLOWMACHINE</td>
597
<td>Nonzero if the computer has a low-end (slow) processor; otherwise,
603
<td>Nonzero if the current operating system is Windows XP Starter
604
Edition; otherwise, 0.
608
<td>SM_SWAPBUTTON</td>
609
<td>Nonzero if the meanings of the left and right mouse buttons are
610
swapped; otherwise, 0.
615
<td>Nonzero if the current operating system is the Windows XP Tablet
616
PC edition, 0 if not.
620
<td>SM_XVIRTUALSCREEN</td>
621
<td>The coordinates for the left side of the virtual screen. The
622
virtual screen is the bounding rectangle of all display monitors. The
623
SM_CXVIRTUALSCREEN metric is the width of the virtual screen.
627
<td>SM_YVIRTUALSCREEN</td>
628
<td>The coordinates for the top of the virtual screen. The virtual
629
screen is the bounding rectangle of all display monitors. The
630
SM_CYVIRTUALSCREEN metric is the height of the virtual screen.
636
<title>Examples</title>
637
<programlisting role="example"><![CDATA[
15
<refname>getsystemmetrics</refname>
16
<refpurpose>Retrieves the specified system metric or system configuration
17
setting (Windows only)
21
<title>Calling Sequence</title>
22
<synopsis>res = getsystemmetrics(key)</synopsis>
25
<title>Arguments</title>
30
<para>a value (integer)</para>
36
<para>a string (see below)</para>
42
<title>Description</title>
43
<para>Retrieves the specified system metric or system configuration
46
<informaltable border="1">
49
<td>The flags that specify how the system arranged minimized windows.
50
For more information, see the Remarks section in this topic.
55
<td>The value that specifies how the system is started: 0 Normal boot
56
1 Fail-safe boot 2 Fail-safe with network boot A fail-safe boot (also
57
called SafeBoot, Safe Mode, or Clean Boot) bypasses the user startup
63
<td>The number of display monitors on a desktop. For more information,
64
see the Remarks section in this topic.
68
<td>SM_CMOUSEBUTTONS</td>
69
<td>The number of buttons on a mouse, or zero if no mouse is
75
<td>The width of a window border, in pixels. This is equivalent to the
76
SM_CXEDGE value for windows with the 3-D look.
81
<td>The width of a cursor, in pixels. The system cannot create cursors
86
<td>SM_CXDLGFRAME</td>
87
<td>This value is the same as SM_CXFIXEDFRAME.</td>
90
<td>SM_CXDOUBLECLK</td>
91
<td>The width of the rectangle around the location of a first click in
92
a double-click sequence, in pixels. The second click must occur within
93
the rectangle that is defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
94
the system to consider the two clicks a double-click. The two clicks
95
must also occur within a specified time. To set the width of the
96
double-click rectangle, call SystemParametersInfo with
97
SPI_SETDOUBLECLKWIDTH.
102
<td>The number of pixels on either side of a mouse-down point that the
103
mouse pointer can move before a drag operation begins. This allows the
104
user to click and release the mouse button easily without
105
unintentionally starting a drag operation. If this value is negative,
106
it is subtracted from the left of the mouse-down point and added to
112
<td>The width of a 3-D border, in pixels. This metric is the 3-D
113
counterpart of SM_CXBORDER.
117
<td>SM_CXFIXEDFRAME</td>
118
<td>The thickness of the frame around the perimeter of a window that
119
has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
120
height of the horizontal border, and SM_CYFIXEDFRAME is the width of
121
the vertical border. This value is the same as SM_CXDLGFRAME.
125
<td>SM_CXFOCUSBORDER</td>
126
<td>The width of the left and right edges of the focus rectangle that
127
the DrawFocusRect draws. This value is in pixels.
132
<td>This value is the same as SM_CXSIZEFRAME.</td>
135
<td>SM_CXFULLSCREEN</td>
136
<td>The width of the client area for a full-screen window on the
137
primary display monitor, in pixels. To get the coordinates of the
138
portion of the screen that is not obscured by the system taskbar or by
139
application desktop toolbars, call the SystemParametersInfo function
140
with the SPI_GETWORKAREA value.
144
<td>SM_CXHSCROLL</td>
145
<td>The width of the arrow bitmap on a horizontal scroll bar, in
151
<td>The width of the thumb box in a horizontal scroll bar, in
157
<td>The default width of an icon, in pixels. The LoadIcon function can
158
load only icons with the dimensions that SM_CXICON and SM_CYICON
163
<td>SM_CXICONSPACING</td>
164
<td>The width of a grid cell for items in large icon view, in pixels.
165
Each item fits into a rectangle of size SM_CXICONSPACING by
166
SM_CYICONSPACING when arranged. This value is always greater than or
171
<td>SM_CXMAXIMIZED</td>
172
<td>The default width, in pixels, of a maximized top-level window on
173
the primary display monitor.
177
<td>SM_CXMAXTRACK</td>
178
<td>The default maximum width of a window that has a caption and
179
sizing borders, in pixels. This metric refers to the entire desktop.
180
The user cannot drag the window frame to a size larger than these
181
dimensions. A window can override this value by processing the
182
WM_GETMINMAXINFO message.
186
<td>SM_CXMENUCHECK</td>
187
<td>The width of the default menu check-mark bitmap, in pixels.</td>
190
<td>SM_CXMENUSIZE</td>
191
<td>The width of menu bar buttons, such as the child window close
192
button that is used in the multiple document interface, in
198
<td>The minimum width of a window, in pixels.</td>
201
<td>SM_CXMINIMIZED</td>
202
<td>The width of a minimized window, in pixels.</td>
205
<td>SM_CXMINSPACING</td>
206
<td>The width of a grid cell for a minimized window, in pixels. Each
207
minimized window fits into a rectangle this size when arranged. This
208
value is always greater than or equal to SM_CXMINIMIZED.
212
<td>SM_CXMINTRACK</td>
213
<td>The minimum tracking width of a window, in pixels. The user cannot
214
drag the window frame to a size smaller than these dimensions. A
215
window can override this value by processing the WM_GETMINMAXINFO
220
<td>SM_CXPADDEDBORDER</td>
221
<td>The amount of border padding for captioned windows, in
227
<td>The width of the screen of the primary display monitor, in pixels.
228
This is the same value obtained by calling GetDeviceCaps as follows:
229
GetDeviceCaps( hdcPrimaryMonitor, HORZRES).
234
<td>The width of a button in a window caption or title bar, in
239
<td>SM_CXSIZEFRAME</td>
240
<td>The thickness of the sizing border around the perimeter of a
241
window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
242
the horizontal border, and SM_CYSIZEFRAME is the height of the
243
vertical border. This value is the same as SM_CXFRAME.
248
<td>The recommended width of a small icon, in pixels. Small icons
249
typically appear in window captions and in small icon view.
254
<td>The width of small caption buttons, in pixels.</td>
257
<td>SM_CXVIRTUALSCREEN</td>
258
<td>The width of the virtual screen, in pixels. The virtual screen is
259
the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN
260
metric is the coordinates for the left side of the virtual
265
<td>SM_CXVSCROLL</td>
266
<td>The width of a vertical scroll bar, in pixels.</td>
270
<td>The height of a window border, in pixels. This is equivalent to
271
the SM_CYEDGE value for windows with the 3-D look.
275
<td>SM_CYCAPTION</td>
276
<td>The height of a caption area, in pixels.</td>
280
<td>The height of a cursor, in pixels. The system cannot create
281
cursors of other sizes.
285
<td>SM_CYDLGFRAME</td>
286
<td>This value is the same as SM_CYFIXEDFRAME.</td>
289
<td>SM_CYDOUBLECLK</td>
290
<td>The height of the rectangle around the location of a first click
291
in a double-click sequence, in pixels. The second click must occur
292
within the rectangle defined by SM_CXDOUBLECLK and SM_CYDOUBLECLK for
293
the system to consider the two clicks a double-click. The two clicks
294
must also occur within a specified time. To set the height of the
295
double-click rectangle, call SystemParametersInfo with
296
SPI_SETDOUBLECLKHEIGHT.
301
<td>The number of pixels above and below a mouse-down point that the
302
mouse pointer can move before a drag operation begins. This allows the
303
user to click and release the mouse button easily without
304
unintentionally starting a drag operation. If this value is negative,
305
it is subtracted from above the mouse-down point and added below
311
<td>The height of a 3-D border, in pixels. This is the 3-D counterpart
316
<td>SM_CYFIXEDFRAME</td>
317
<td>The thickness of the frame around the perimeter of a window that
318
has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the
319
height of the horizontal border, and SM_CYFIXEDFRAME is the width of
320
the vertical border. This value is the same as SM_CYDLGFRAME.
324
<td>SM_CYFOCUSBORDER</td>
325
<td>The height of the top and bottom edges of the focus rectangle
326
drawn by DrawFocusRect. This value is in pixels.
331
<td>This value is the same as SM_CYSIZEFRAME.</td>
334
<td>SM_CYFULLSCREEN</td>
335
<td>The height of the client area for a full-screen window on the
336
primary display monitor, in pixels. To get the coordinates of the
337
portion of the screen not obscured by the system taskbar or by
338
application desktop toolbars, call the SystemParametersInfo function
339
with the SPI_GETWORKAREA value.
343
<td>SM_CYHSCROLL</td>
344
<td>The height of a horizontal scroll bar, in pixels.</td>
348
<td>The default height of an icon, in pixels. The LoadIcon function
349
can load only icons with the dimensions SM_CXICON and SM_CYICON.
353
<td>SM_CYICONSPACING</td>
354
<td>The height of a grid cell for items in large icon view, in pixels.
355
Each item fits into a rectangle of size SM_CXICONSPACING by
356
SM_CYICONSPACING when arranged. This value is always greater than or
361
<td>SM_CYKANJIWINDOW</td>
362
<td>For double byte character set versions of the system, this is the
363
height of the Kanji window at the bottom of the screen, in
368
<td>SM_CYMAXIMIZED</td>
369
<td>The default height, in pixels, of a maximized top-level window on
370
the primary display monitor.
374
<td>SM_CYMAXTRACK</td>
375
<td>The default maximum height of a window that has a caption and
376
sizing borders, in pixels. This metric refers to the entire desktop.
377
The user cannot drag the window frame to a size larger than these
378
dimensions. A window can override this value by processing the
379
WM_GETMINMAXINFO message.
384
<td>The height of a single-line menu bar, in pixels.</td>
387
<td>SM_CYMENUCHECK</td>
388
<td>The height of the default menu check-mark bitmap, in pixels.</td>
391
<td>SM_CYMENUSIZE</td>
392
<td>The height of menu bar buttons, such as the child window close
393
button that is used in the multiple document interface, in
399
<td>The minimum height of a window, in pixels.</td>
402
<td>SM_CYMINIMIZED</td>
403
<td>The height of a minimized window, in pixels.</td>
406
<td>SM_CYMINSPACING</td>
407
<td>The height of a grid cell for a minimized window, in pixels. Each
408
minimized window fits into a rectangle this size when arranged. This
409
value is always greater than or equal to SM_CYMINIMIZED.
413
<td>SM_CYMINTRACK</td>
414
<td>The minimum tracking height of a window, in pixels. The user
415
cannot drag the window frame to a size smaller than these dimensions.
416
A window can override this value by processing the WM_GETMINMAXINFO
422
<td>The height of the screen of the primary display monitor, in
423
pixels. This is the same value obtained by calling GetDeviceCaps as
424
follows: GetDeviceCaps( hdcPrimaryMonitor, VERTRES).
429
<td>The height of a button in a window caption or title bar, in
434
<td>SM_CYSIZEFRAME</td>
435
<td>The thickness of the sizing border around the perimeter of a
436
window that can be resized, in pixels. SM_CXSIZEFRAME is the width of
437
the horizontal border, and SM_CYSIZEFRAME is the height of the
438
vertical border. This value is the same as SM_CYFRAME.
442
<td>SM_CYSMCAPTION</td>
443
<td>The height of a small caption, in pixels.</td>
447
<td>The recommended height of a small icon, in pixels. Small icons
448
typically appear in window captions and in small icon view.
453
<td>The height of small caption buttons, in pixels.</td>
456
<td>SM_CYVIRTUALSCREEN</td>
457
<td>The height of the virtual screen, in pixels. The virtual screen is
458
the bounding rectangle of all display monitors. The SM_YVIRTUALSCREEN
459
metric is the coordinates for the top of the virtual screen.
463
<td>SM_CYVSCROLL</td>
464
<td>The height of the arrow bitmap on a vertical scroll bar, in
470
<td>The height of the thumb box in a vertical scroll bar, in
475
<td>SM_DBCSENABLED</td>
476
<td>Nonzero if User32.dll supports DBCS; otherwise, 0.</td>
480
<td>Nonzero if the debug version of User.exe is installed; otherwise,
485
<td>SM_IMMENABLED</td>
486
<td>Nonzero if Input Method Manager/Input Method Editor features are
487
enabled; otherwise, 0. SM_IMMENABLED indicates whether the system is
488
ready to use a Unicode-based IME on a Unicode application. To ensure
489
that a language-dependent IME works, check SM_DBCSENABLED and the
490
system ANSI code page. Otherwise the ANSI-to-Unicode conversion may
491
not be performed correctly, or some components like fonts or registry
492
settings may not be present.
496
<td>SM_MEDIACENTER</td>
497
<td>Nonzero if the current operating system is the Windows XP, Media
498
Center Edition, 0 if not.
502
<td>SM_MENUDROPALIGNMENT</td>
503
<td>Nonzero if drop-down menus are right-aligned with the
504
corresponding menu-bar item; 0 if the menus are left-aligned.
508
<td>SM_MIDEASTENABLED</td>
509
<td>Nonzero if the system is enabled for Hebrew and Arabic languages,
514
<td>SM_MOUSEPRESENT</td>
515
<td>Nonzero if a mouse is installed; otherwise, 0. This value is
516
rarely zero, because of support for virtual mice and because some
517
systems detect the presence of the port instead of the presence of a
522
<td>SM_MOUSEHORIZONTALWHEELPRESENT</td>
523
<td>Nonzero if a mouse with a horizontal scroll wheel is installed;
528
<td>SM_MOUSEWHEELPRESENT</td>
529
<td>Nonzero if a mouse with a vertical scroll wheel is installed;
535
<td>The least significant bit is set if a network is present;
536
otherwise, it is cleared. The other bits are reserved for future
541
<td>SM_PENWINDOWS</td>
542
<td>Nonzero if the Microsoft Windows for Pen computing extensions are
543
installed; zero otherwise.
547
<td>SM_REMOTECONTROL</td>
548
<td>This system metric is used in a Terminal Services environment. Its
549
value is nonzero if the current session is remotely controlled;
554
<td>SM_REMOTESESSION</td>
555
<td>This system metric is used in a Terminal Services environment. If
556
the calling process is associated with a Terminal Services client
557
session, the return value is nonzero. If the calling process is
558
associated with the Terminal Server console session, the return value
559
is 0. The console session is not necessarily the physical console. For
560
more information, see WTSGetActiveConsoleSessionId.
564
<td>SM_SAMEDISPLAYFORMAT</td>
565
<td>Nonzero if all the display monitors have the same color format,
566
otherwise, 0. Two displays can have the same bit depth, but different
567
color formats. For example, the red, green, and blue pixels can be
568
encoded with different numbers of bits, or those bits can be located
569
in different places in a pixel color value.
574
<td>This system metric should be ignored; it always returns 0.</td>
578
<td>The build number if the system is Windows Server 2003 R2;
583
<td>SM_SHOWSOUNDS</td>
584
<td>Nonzero if the user requires an application to present information
585
visually in situations where it would otherwise present the
586
information only in audible form; otherwise, 0.
590
<td>SM_SHUTTINGDOWN</td>
591
<td>Nonzero if the current session is shutting down; otherwise,
596
<td>SM_SLOWMACHINE</td>
597
<td>Nonzero if the computer has a low-end (slow) processor; otherwise,
603
<td>Nonzero if the current operating system is Windows XP Starter
604
Edition; otherwise, 0.
608
<td>SM_SWAPBUTTON</td>
609
<td>Nonzero if the meanings of the left and right mouse buttons are
610
swapped; otherwise, 0.
615
<td>Nonzero if the current operating system is the Windows XP Tablet
616
PC edition, 0 if not.
620
<td>SM_XVIRTUALSCREEN</td>
621
<td>The coordinates for the left side of the virtual screen. The
622
virtual screen is the bounding rectangle of all display monitors. The
623
SM_CXVIRTUALSCREEN metric is the width of the virtual screen.
627
<td>SM_YVIRTUALSCREEN</td>
628
<td>The coordinates for the top of the virtual screen. The virtual
629
screen is the bounding rectangle of all display monitors. The
630
SM_CYVIRTUALSCREEN metric is the height of the virtual screen.
636
<title>Examples</title>
637
<programlisting role="example"><![CDATA[
638
638
getsystemmetrics('SM_MOUSEPRESENT')
639
639
getsystemmetrics('SM_SLOWMACHINE')
640
640
getsystemmetrics('SM_REMOTESESSION');
641
641
]]></programlisting>