GetTextMetrics
The GetTextMetrics function fills the specified buffer with the metrics for the currently selected font.
BOOL GetTextMetrics(
HDC hdc, // handle to DC
LPTEXTMETRIC lptm // text metrics
);
Parameters
hdc
[in] Handle to the device context.
lptm
[out] Pointer to the TEXTMETRIC structure that receives the text metrics.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT/2000/XP: To get extended error information, call GetLastError.
Windows 95/98/Me: GetTextMetricsW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Example Code
For an example, see Displaying Keyboard Input or Drawing Text from Different Fonts on the Same Line.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP. Also supported by Microsoft Layer for Unicode.
See Also
Fonts and Text Overview, Font and Text Functions, GetTextAlign, GetTextExtentPoint32, GetTextFace, SetTextJustification, TEXTMETRIC
TEXTMETRIC
The TEXTMETRIC structure contains basic information about a physical font. All sizes are specified in logical units; that is, they depend on the current mapping mode of the display context.
typedef struct tagTEXTMETRIC {
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
TCHAR tmFirstChar;
TCHAR tmLastChar;
TCHAR tmDefaultChar;
TCHAR tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
} TEXTMETRIC, *PTEXTMETRIC;
Members
tmHeight
Specifies the height (ascent + descent) of characters.
tmAscent
Specifies the ascent (units above the base line) of characters.
tmDescent
Specifies the descent (units below the base line) of characters.
tmInternalLeading
Specifies the amount of leading (space) inside the bounds set by the tmHeight member. Accent marks and other diacritical characters may occur in this area. The designer may set this member to zero.
tmExternalLeading
Specifies the amount of extra leading (space) that the application adds between rows. Since this area is outside the font, it contains no marks and is not altered by text output calls in either OPAQUE or TRANSPARENT mode. The designer may set this member to zero.
tmAveCharWidth
Specifies the average width of characters in the font (generally defined as the width of the letter x). This value does not include the overhang required for bold or italic characters.
tmMaxCharWidth
Specifies the width of the widest character in the font.
tmWeight
Specifies the weight of the font.
tmOverhang
Specifies the extra width per string that may be added to some synthesized fonts. When synthesizing some attributes, such as bold or italic, graphics device interface (GDI) or a device may have to add width to a string on both a per-character and per-string basis. For example, GDI makes a string bold by expanding the spacing of each character and overstriking by an offset value; it italicizes a font by shearing the string. In either case, there is an overhang past the basic string. For bold strings, the overhang is the distance by which the overstrike is offset. For italic strings, the overhang is the amount the top of the font is sheared past the bottom of the font.
The tmOverhang member enables the application to determine how much of the character width returned by a GetTextExtentPoint32 function call on a single character is the actual character width and how much is the per-string extra width. The actual width is the extent minus the overhang.
tmDigitizedAspectX
Specifies the horizontal aspect of the device for which the font was designed.
tmDigitizedAspectY
Specifies the vertical aspect of the device for which the font was designed. The ratio of the tmDigitizedAspectX and tmDigitizedAspectY members is the aspect ratio of the device for which the font was designed.
tmFirstChar
Specifies the value of the first character defined in the font.
tmLastChar
Specifies the value of the last character defined in the font.
tmDefaultChar
Specifies the value of the character to be substituted for characters not in the font.
tmBreakChar
Specifies the value of the character that will be used to define word breaks for text justification.
tmItalic
Specifies an italic font if it is nonzero.
tmUnderlined
Specifies an underlined font if it is nonzero.
tmStruckOut
Specifies a strikeout font if it is nonzero.
tmPitchAndFamily
Specifies information about the pitch, the technology, and the family of a physical font.
The four low-order bits of this member specify information about the pitch and the technology of the font. A constant is defined for each of the four bits. Constant Meaning
TMPF_FIXED_PITCH If this bit is set the font is a variable pitch font. If this bit is clear the font is a fixed pitch font. Note very carefully that those meanings are the opposite of what the constant name implies.
TMPF_VECTOR If this bit is set the font is a vector font.
TMPF_TRUETYPE If this bit is set the font is a TrueType font.
TMPF_DEVICE If this bit is set the font is a device font.
TextOut
The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.
BOOL TextOut(
HDC hdc, // handle to DC
int nXStart, // x-coordinate of starting position
int nYStart, // y-coordinate of starting position
LPCTSTR lpString, // character string
int cbString // number of characters
);
Parameters
hdc
[in] Handle to the device context.
nXStart
[in] Specifies the x-coordinate, in logical coordinates, of the reference point that the system uses to align the string.
nYStart
[in] Specifies the y-coordinate, in logical coordinates, of the reference point that the system uses to align the string.
lpString
[in] Pointer to the string to be drawn. The string does not need to be zero-terminated, since cbString specifies the length of the string.
cbString
[in] Specifies the length of the string. For the ANSI function it is a BYTE count and for the Unicode function it is a WORD count. Note that for the ANSI function, characters in SBCS code pages take one byte each while most characters in DBCS code pages take two bytes; for the Unicode function, most currently defined Unicode characters (those in the Basic Multilingual Plane (BMP)) are one WORD while Unicode surrogates are two WORDs.
Windows 95/98/Me: This value may not exceed 8192.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT/2000/XP: To get extended error information, call GetLastError.
Remarks
Although not true in general, Windows 95/98/Me supports the Unicode version of this function as well as the ANSI version.
The interpretation of the reference point depends on the current text-alignment mode. An application can retrieve this mode by calling the GetTextAlign function; an application can alter this mode by calling the SetTextAlign function.
By default, the current position is not used or updated by this function. However, an application can call the SetTextAlign function with the fMode parameter set to TA_UPDATECP to permit the system to use and update the current position each time the application calls TextOut for a specified device context. When this flag is set, the system ignores the nXStart and nYStart parameters on subsequent TextOut calls.
When the TextOut function is placed inside a path bracket, the system generates a path for the TrueType text that includes each character plus its character box. The region generated is the character box minus the text, rather than the text itself. You can obtain the region enclosed by the outline of the TrueType text by setting the background mode to transparent before placing the TextOut function in the path bracket. Following is sample code that demonstrates this procedure.
// Obtain the window's client rectangle
GetClientRect(hwnd, &r);
// THE FIX: by setting the background mode
// to transparent, the region is the text itself
// SetBkMode(hdc, TRANSPARENT);
// Bracket begin a path
BeginPath(hdc);
// Send some text out into the world
TextOut(hdc, r.left, r.top, "Defenestration can be hazardous", 4);
// Bracket end a path
EndPath(hdc);
// Derive a region from that path
SelectClipPath(hdc, RGN_AND);
// This generates the same result as SelectClipPath()
// SelectClipRgn(hdc, PathToRegion(hdc));
// Fill the region with grayness
FillRect(hdc, &r, GetStockObject(GRAY_BRUSH));
Windows 95/98/Me: Although TextOutW exists on Windows 95/98/Me, it is supported by the Microsoft Layer for Unicode to provide more consistent behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Example Code
For an example, see Enumerating the Installed Fonts.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
Unicode: Implemented as Unicode and ANSI versions on all platforms. Also supported by Microsoft Layer for Unicode.
See Also
Fonts and Text Overview, Font and Text Functions, GetTextAlign, SelectObject, SetBkColor, SetTextAlign, SetTextColor, TabbedTextOut
An application should carefully test for qualities encoded in these low-order bits, making no arbitrary assumptions. For example, besides having their own bits set, TrueType and PostScript fonts set the TMPF_VECTOR bit. A monospace bitmap font has all of these low-order bits clear; a proportional bitmap font sets the TMPF_FIXED_PITCH bit. A Postscript printer device font sets the TMPF_DEVICE, TMPF_VECTOR, and TMPF_FIXED_PITCH bits.
The four high-order bits of tmPitchAndFamily designate the font's font family. An application can use the value 0xF0 and the bitwise AND operator to mask out the four low-order bits of tmPitchAndFamily, thus obtaining a value that can be directly compared with font family names to find an identical match. For information about font families, see the description of the LOGFONT structure.
tmCharSet
Specifies the character set of the font. The character set can be one of the following values.
ANSI_CHARSET
BALTIC_CHARSET
CHINESEBIG5_CHARSET
DEFAULT_CHARSET
EASTEUROPE_CHARSET
GB2312_CHARSET
GREEK_CHARSET
HANGUL_CHARSET
MAC_CHARSET
OEM_CHARSET
RUSSIAN_CHARSET
SHIFTJIS_CHARSET
SYMBOL_CHARSET
TURKISH_CHARSET
VIETNAMESE_CHARSET
Korean language edition of Windows:
JOHAB_CHARSET
Middle East language edition of Windows:
ARABIC_CHARSET
HEBREW_CHARSET
Thai language edition of Windows:
THAI_CHARSET
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Unicode: Declared as Unicode and ANSI structures.
See Also
Fonts and Text Overview, Font and Text Structures, GetTextMetrics, GetTextExtentPoint32, LOGFONT
SetTextAlign
The SetTextAlign function sets the text-alignment flags for the specified device context.
UINT SetTextAlign(
HDC hdc, // handle to DC
UINT fMode // text-alignment option
);
Parameters
hdc
[in] Handle to the device context.
fMode
[in] Specifies the text alignment by using a mask of the values in the following list. Only one flag can be chosen from those that affect horizontal and vertical alignment. In addition, only one of the two flags that alter the current position can be chosen. Value Meaning
TA_BASELINE The reference point will be on the base line of the text.
TA_BOTTOM The reference point will be on the bottom edge of the bounding rectangle.
TA_TOP The reference point will be on the top edge of the bounding rectangle.
TA_CENTER The reference point will be aligned horizontally with the center of the bounding rectangle.
TA_LEFT The reference point will be on the left edge of the bounding rectangle.
TA_RIGHT The reference point will be on the right edge of the bounding rectangle.
TA_NOUPDATECP The current position is not updated after each text output call. The reference point is passed to the text output function.
TA_RTLREADING Middle East language edition of Windows: The text is laid out in right to left reading order, as opposed to the default left to right order. This applies only when the font selected into the device context is either Hebrew or Arabic.
TA_UPDATECP The current position is updated after each text output call. The current position is used as the reference point.
When the current font has a vertical default base line, as with Kanji, the following values must be used instead of TA_BASELINE and TA_CENTER. Value Meaning
VTA_BASELINE The reference point will be on the base line of the text.
VTA_CENTER The reference point will be aligned vertically with the center of the bounding rectangle.
The default values are TA_LEFT, TA_TOP, and TA_NOUPDATECP.
Return Values
If the function succeeds, the return value is the previous text-alignment setting.
If the function fails, the return value is GDI_ERROR.
Windows NT/2000/XP: To get extended error information, call GetLastError.
Remarks
The TextOut and ExtTextOut functions use the text-alignment flags to position a string of text on a display or other device. The flags specify the relationship between a reference point and a rectangle that bounds the text. The reference point is either the current position or a point passed to a text output function.
The rectangle that bounds the text is formed by the character cells in the text string.
The best way to get left-aligned text is to use either
SetTextAlign (hdc, GetTextAlign(hdc) & (~TA_CENTER))
– or –
SetTextAlign (hdc,TA_LEFT | <other flags>)
You can also use SetTextAlign (hdc, TA_LEFT) for this purpose, but this loses any vertical or right-to-left settings.
Note You should not use SetTextAlign with TA_UPDATECP when you are using ScriptStringOut, because selected text is not rendered correctly. If you must use this flag, you can unset and reset it as necessary to avoid the problem.
Example Code
For an example, see Setting the Text Alignment.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
See Also
Fonts and Text Overview, Font and Text Functions, ExtTextOut, GetTextAlign, ScriptStringOut, TextOut
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 // system metric or configuration setting
);
Parameters
nIndex
[in] 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 Flags specifying how the system arranged minimized windows. For more information about minimized windows, see the following Remarks section.
SM_CLEANBOOT 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 Windows 98/Me, Windows 2000/XP: Number of display monitors on the desktop. See Remarks for more information.
SM_CMOUSEBUTTONS Number of buttons on mouse, or zero if no mouse is installed.
SM_CXBORDER,
SM_CYBORDER Width and height, in pixels, of a window border. This is equivalent to the SM_CXEDGE value for windows with the 3-D look.
SM_CXCURSOR,
SM_CYCURSOR Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes.
SM_CXDLGFRAME,
SM_CYDLGFRAME Same as SM_CXFIXEDFRAME and SM_CYFIXEDFRAME.
SM_CXDOUBLECLK,
SM_CYDOUBLECLK Width and height, in pixels, of the 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. (The two clicks must also occur within a specified time.)
To set the width and height of the double-click rectangle, call SystemParametersInfo with the SPI_SETDOUBLECLKHEIGHT and SPI_SETDOUBLECLKWIDTH flags.
SM_CXDRAG,
SM_CYDRAG Width and height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation.
SM_CXEDGE,
SM_CYEDGE Dimensions, in pixels, of a 3-D border. These are the 3-D counterparts of SM_CXBORDER and SM_CYBORDER.
SM_CXFIXEDFRAME,
SM_CYFIXEDFRAME Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. SM_CXFIXEDFRAME is the height of the horizontal border and SM_CYFIXEDFRAME is the width of the vertical border.
Same as SM_CXDLGFRAME and SM_CYDLGFRAME.
SM_CXFOCUSBORDER,
SM_CYFOCUSBORDER Windows XP: The width of the left and right edges and the height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. These values are in pixels.
SM_CXFRAME,
SM_CYFRAME Same as SM_CXSIZEFRAME and SM_CYSIZEFRAME.
SM_CXFULLSCREEN,
SM_CYFULLSCREEN Width and height of the client area for a full-screen window on the primary display monitor. 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,
SM_CYHSCROLL Width, in pixels, of the arrow bitmap on a horizontal scroll bar; and height, in pixels, of a horizontal scroll bar.
SM_CXHTHUMB Width, in pixels, of the thumb box in a horizontal scroll bar.
SM_CXICON,
SM_CYICON The default width and height, in pixels, of an icon. The LoadIcon function can load only icons of these dimensions.
SM_CXICONSPACING,
SM_CYICONSPACING Dimensions, in pixels, of a grid cell for items in large icon view. 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 Default dimensions, in pixels, of a maximized top-level window on the primary display monitor.
SM_CXMAXTRACK,
SM_CYMAXTRACK Default maximum dimensions, in pixels, of a window that has a caption and sizing borders. 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 these values by processing the WM_GETMINMAXINFO message.
SM_CXMENUCHECK,
SM_CYMENUCHECK Dimensions, in pixels, of the default menu check-mark bitmap.
SM_CXMENUSIZE,
SM_CYMENUSIZE Dimensions, in pixels, of menu bar buttons, such as the child window close button used in the multiple document interface.
SM_CXMIN,
SM_CYMIN Minimum width and height, in pixels, of a window.
SM_CXMINIMIZED,
SM_CYMINIMIZED Dimensions, in pixels, of a normal minimized window.
SM_CXMINSPACING
SM_CYMINSPACING Dimensions, in pixels, of a grid cell for minimized windows. 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, in pixels, 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, in pixels, of the screen of the primary display monitor. These are the same values you obtain by calling GetDeviceCaps(hdcPrimaryMonitor, HORZRES/VERTRES).
SM_CXSIZE,
SM_CYSIZE Width and height, in pixels, of a button in a window's caption or title bar.
SM_CXSIZEFRAME,
SM_CYSIZEFRAME Thickness, in pixels, of the sizing border around the perimeter of a window that can be resized. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
Same as SM_CXFRAME and SM_CYFRAME.
SM_CXSMICON,
SM_CYSMICON Recommended dimensions, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view.
SM_CXSMSIZE
SM_CYSMSIZE Dimensions, in pixels, of small caption buttons.
SM_CXVIRTUALSCREEN,
SM_CYVIRTUALSCREEN Windows 98/Me, Windows 2000/XP: Width and height, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN metrics are the coordinates of the top-left corner of the virtual screen.
SM_CXVSCROLL,
SM_CYVSCROLL Width, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical scroll bar.
SM_CYCAPTION Height, in pixels, of a normal caption area.
SM_CYKANJIWINDOW For double byte character set versions of the system, this is the height, in pixels, of the Kanji window at the bottom of the screen.
SM_CYMENU Height, in pixels, of a single-line menu bar.
SM_CYSMCAPTION Height, in pixels, of a small caption.
SM_CYVTHUMB Height, in pixels, of the thumb box in a vertical scroll bar.
SM_DBCSENABLED TRUE or nonzero if the double-byte character-set (DBCS) version of User.exe is installed; FALSE or zero otherwise.
SM_DEBUG TRUE or nonzero if the debugging version of User.exe is installed; FALSE or zero otherwise.
SM_IMMENABLED Windows 2000/XP: TRUE or nonzero if Input Method Manager/Input Method Editor features are enabled; FALSE or zero otherwise.
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_MENUDROPALIGNMENT TRUE or nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; FALSE or zero if the menus are left-aligned.
SM_MIDEASTENABLED TRUE if the system is enabled for Hebrew and Arabic languages.
SM_MOUSEPRESENT TRUE or nonzero if a mouse is installed; FALSE or zero otherwise.
SM_MOUSEWHEELPRESENT Windows NT 4.0 and later, Windows 98/Me: TRUE or nonzero if a mouse with a wheel is installed; FALSE or zero otherwise.
SM_NETWORK 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 nonzero if the Microsoft Windows for Pen computing extensions are installed; FALSE or zero otherwise.
SM_REMOTESESSION Windows NT 4.0 SP4 and later: 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 TRUE or nonzero. If the calling process is associated with the Terminal Server console session, the return value is zero.
SM_SECURE TRUE if security is present; FALSE otherwise.
SM_SAMEDISPLAYFORMAT Windows 98/Me, Windows 2000/XP: TRUE if all the display monitors have the same color format, FALSE 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.
SM_SHOWSOUNDS TRUE or nonzero 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_SHUTTINGDOWN Windows XP: TRUE if the current session is shutting down; FALSE otherwise.
SM_SLOWMACHINE TRUE if the computer has a low-end (slow) processor; FALSE otherwise.
SM_SWAPBUTTON TRUE or nonzero if the meanings of the left and right mouse buttons are swapped; FALSE or zero otherwise.
SM_XVIRTUALSCREEN,
SM_YVIRTUALSCREEN Windows 98/Me, Windows 2000/XP: Coordinates for the left side and the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN metrics are the width and height of the virtual screen.
Return Values
If the function succeeds, the return value is the requested system metric or configuration setting.
If the function fails, the return value is zero. GetLastError does not provide extended error information.
Remarks
System metrics may vary from display to display.
GetSystemMetrics(SM_CMONITORS) counts only display monitors. This is different from EnumDisplayMonitors which enumerates display monitors and also non-display pseudo-monitors.
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 the following values.
Value Meaning
ARW_BOTTOMLEFT Start at the lower-left corner of the screen (default position).
ARW_BOTTOMRIGHT Start at the lower-right corner of the screen. Equivalent to ARW_STARTRIGHT.
ARW_HIDE Hide minimized windows by moving them off the visible area of the screen.
ARW_TOPLEFT Start at the upper-left corner of the screen. Equivalent to ARV_STARTTOP.
ARW_TOPRIGHT Start at the upper-right corner of the screen. Equivalent to ARW_STARTTOP | SRW_STARTRIGHT.
The direction in which to arrange can be one of the following 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.
Example Code
For an example, see Getting Hardware Information.
Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
See Also
System Information Overview, System Information Functions, EnumDisplayMonitors, SystemParametersInfo