Help on GetSystemMetrics() 
Author Message
 Help on GetSystemMetrics()

Here is everything you need:

The GetSystemMetrics function retrieves various system metrics and
system configuration settings.

System metrics are the dimensions (widths and heights) of Windows
display elements. All dimensions retrieved by GetSystemMetrics are in
pixels.

int GetSystemMetrics(

    int  nIndex  // system metric or configuration setting to retrieve
   );
Parameters

nIndex

Specifies the system metric or configuration setting to retrieve. All
SM_CX* values are widths. All SM_CY* values are heights. The following
values are defined:

Value Meaning
SM_ARRANGE Windows 95 only: Flags specifying how the system arranged
minimized windows. For more information about minimized windows, see the
following Remarks section.
SM_CLEANBOOT Windows 95 only: Value that specifies how the system was
started:0 Normal boot1 Fail-safe boot2 Fail-safe with network
bootFail-safe boot (also called SafeBoot) bypasses the user's startup
files.
SM_CMETRICS Windows 95 only: Number of system metrics and flags.
SM_CMOUSEBUTTONS Number of buttons on mouse, or zero if no mouse is
installed.
SM_CXBORDER,
SM_CYBORDER Windows NT only: Width and height of window border. Windows
95 only: Dimensions of a single border, in pixels.
SM_CXCURSOR,
SM_CYCURSOR Windows NT only: Width and height of cursor.Windows 95 only:
Dimensions of standard cursor bitmaps, in pixels.
SM_CXDLGFRAME,
SM_CYDLGFRAME Width and height of window frame for a window that has the
WS_DLGFRAME style. Windows 95 only: Obsolete; use SM_CX_FIXEDFRAME and
SM_CYFIXEDFRAME instead.
SM_CXDOUBLECLK,
SM_CYDOUBLECLK Windows NT only: Width and height of a rectangle around
the location of a first click in a double-click sequence. The second
click must occur within this rectangle for the system to consider the
two clicks a double-click.Windows 95 only: Dimensions, in pixels, of the
rectangle within which two successive mouse clicks must fall to generate
a double-click. (The two clicks must also occur within a specified
time.)
SM_CXFRAME,
SM_CYFRAME Width and height of window frame for a window that can be
resized. Windows 95 only: Obsolete; use SM_CX_FIXEDFRAME and
SM_CYFIXEDFRAME instead.
SM_CXFULLSCREEN, SM_CYFULLSCREEN Width and height of the client area for
a full-screen window.
SM_CXHSCROLL,
SM_CYHSCROLL Width and height of arrow bitmap on horizontal scrollbar.
SM_CXHTHUMB,  Width of horizontal scrollbar thumb box.
SM_CXICON,
SM_CYICON The default width and height of an icon. These values are
typically 32x32, but can vary depending on the installed display
hardware.Windows 95 only: The LoadIcon function can only load icons of
these dimensions.
SM_CXICONSPACING, SM_CYICONSPACING Windows NT only: Width and height of
rectangular cell that Program Manager uses to position tiled
icons.Windows 95 only: Dimensions of a grid cell for items in large icon
view, in pixels. Each item fits into a rectangle of this size when
arranged. These values are always greater than or equal to SM_CXICON and
SM_CYICON.
SM_CXMAXIMIZED,
SM_CYMAXIMIZED Windows 95 only: Default dimensions of a maximized
top-level window, in pixels.
SM_CXMAXTRACK,
SM_CYMAXTRACK Windows 95 only: Default maximum dimensions of a window
that has a caption and sizing borders. The user cannot drag the window
frame to a size larger than these dimensions. A window can override
these values by processing the WM_GETMINMAXINFO message.
SM_CXMENUCHECK,
SM_CYMENUCHECK Windows 95 only: Dimensions of the default menu
check-mark bitmap, in pixels.
SM_CXMENUSIZE,
SM_CYMENUSIZE Windows 95 only: Dimensions of menu bar buttons (such as
multiple document (MIDI) child close), in pixels.
SM_CXMINIMIZED,
SM_CYMINIMIZED Windows 95 only: Dimensions of a normal minimized window,
in pixels.
SM_CXMINSPACING
SM_CYMINSPACING Windows 95 only: Dimensions of a grid cell for minimized
windows, in pixels. Each minimized window fits into a rectangle this
size when arranged. These values are always greater than or equal to
SM_CXMINIMIZED and SM_CYMINIMIZED.
SM_CXMINTRACK, SM_CYMINTRACK Minimum tracking width and height of a
window. The user cannot drag the window frame to a size smaller than
these dimensions. A window can override these values by processing the
WM_GETMINMAXINFO message.
SM_CXSCREEN,
SM_CYSCREEN Width and height of the screen.
SM_CXSIZE,
SM_CYSIZE Windows NT only: Width and height of bitmaps contained in
title bar.Windows 95 only: Dimensions of caption buttons, in pixels.
SM_CXSIZEFRAME,
SM_CYSIXEFRAME Windows 95 only: Dimensions, in pixels, of the window
frame for a window that has the WS_THICKFRAME style. Formerly SM_CXFRAME
and SM_CYFRAME.
SM_CXSMICON,
SM_CYSICON Windows 95 only: Recommended dimensions of a small icon, in
pixels. Small icons typically appear in window captions and in small
icon view.
SM_CXSMSIZE
SM_CYSMSIZE Windows 95 only: Dimensions of small caption buttons, in
pixels.
SM_CXVSCROLL
SM_CYHSCROLL Windows 95 only: Width of vertical scrollbar and height of
horizontal scrollbar, in pixels.
SM_CXHSCROLL
SM_CYVSCROLL Windows 95 only: Width of the arrow bitmap on a horizontal
scrollbar, and height of the arrow bitmap on a vertical scrollbar.
SM_CXVSCROLL,
SM_CYVSCROLL Windows NT only: Width and height of arrow bitmap on
vertical scrollbar.
SM_CYVTHUMB Height of vertical scrollbar thumb.
SM_CYCAPTION Height of normal caption area.
SM_CYKANJIWINDOW For double-byte character set versions of Windows,
height of the Kanji window at the bottom of the screen.
SM_CYMENU Height of single-line menu bar.
SM_CYSMCAPTION Windows 95 only: Height of a small caption, in pixels.
SM_DBCSENABLED TRUE or non-zero if the double-byte character set (DBCS)
version of USER.EXE is installed; FALSE, or zero otherwise.
SM_DEBUG TRUE or non-zero if the debugging version of USER.EXE is
installed; FALSE, or zero, otherwise.
SM_MENUDROPALIGNMENT TRUE, or non-zero if pop-up menus are right-aligned
relative to the corresponding menu-bar item; FALSE, or zero if they are
left-aligned.
SM_MIDEASTENABLED Windows 95 only: TRUE if the system is enabled for
Hebrew/Arabic languages.
SM_MOUSEPRESENT TRUE or non-zero if a mouse is installed; FALSE, or
zero, otherwise.
SM_NETWORK Windows 95 only: The least significant bit is set if a
network is present; otherwise, it is cleared. The other bits are
reserved for future use.
SM_PENWINDOWS TRUE or non-zero if the Microsoft Windows for Pen
computing extensions are installed; zero, or FALSE, otherwise.
SM_SECURE Windows 95 only: TRUE if security is present, FALSE otherwise.

SM_SHOWSOUNDS TRUE or non-zero if the user requires an application to
present information visually in situations where it would otherwise
present the information only in audible form; FALSE, or zero, otherwise.

SM_SLOWMACHINE Windows 95 only: TRUE if the computer has a low-end
(slow) processor, FALSE otherwise.
SM_SWAPBUTTON TRUE or non-zero if the meanings of the left and right
mouse buttons are swapped; FALSE, or zero, otherwise.
Return Value

The return value is the requested system metric or configuration
setting.

Remarks

System metrics may vary from display to display.
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 these values:

Value Meaning
ARW_BOTTOMLEFT Start at lower-left corner of screen (default position).
ARW_BOTTOMRIGHT Start at lower-right corner of screen. Equivelant to
ARW_STARTRIGHT.
ARW_HIDE Hide minimized windows by moving them off of the visible area
of the screen.
ARW_TOPLEFT Start at upper-left corner of screen. Equivelant to
ARV_STARTTOP.
ARW_TOPRIGHT Start at upper-right corner of screen. Equivelant to
ARW_STARTTOP | SRW_STARTRIGHT.
The direction in which to arrange can be one of these values:

Value Meaning
ARW_DOWN Arrange vertically, top to bottom.
ARW_LEFT Arrange horizontally, left to right.
ARW_RIGHT Arrange horizontally, right to left.
ARW_UP Arrange vertically, bottom to top.
_________________________________________

Quote:

> Hi

> Can anybody give me the discription/usage of the
> different SM_ constants of the GetSystemMetrics() API call

> Thanks
> Tab

--
                       \\~ ~//

        ----------o00o-(_)-o00o-------------


Sun, 11 Mar 2001 03:00:00 GMT  
 Help on GetSystemMetrics()
I have a good sample at www.TheScarms.com called System Metric
Information in the VB area.


Sat, 17 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help on GetSystemMetrics()

2. Help on GetSystemMetrics()

3. Help on GetSystemMetrics()

4. Help on GetSystemMetrics()

5. Help GetSystemMetrics

6. GetSystemMetrics and VB.NET

7. GetSystemMetrics: How do I find client area?

8. GetSystemMetrics

9. Resizing using values from GetSystemMetrics

10. GetSystemMetrics from vbscript?

11. GetSystemMetrics

12. GetSystemMetrics and header file in Access

 

 
Powered by phpBB® Forum Software