The SystemParametersInfo function queries or sets systemwide parameters. This function can also update the user profile while setting a parameter.
BOOL SystemParametersInfo(
UINT uiAction, // system parameter to query or set
UINT uiParam, // depends on action to be taken
PVOID pvParam, // depends on action to be taken
UINT fWinIni // user profile update flag
);
Value | Meaning |
---|---|
SPI_GETACCESSTIMEOUT | Retrieves information about the time-out period associated with the accessibility features. The pvParam parameter must point to an ACCESSTIMEOUT structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(ACCESSTIMEOUT). |
SPI_GETACTIVEWINDOWTRACKING | Windows NT 5.0 and later, Windows 98: Indicates whether active window tracking (activating the window the mouse is on) is on or off. The pvParam parameter must point to a BOOL variable that receives TRUE for on, or FALSE for off. |
SPI_GETACTIVEWNDTRKZORDER | Windows NT 5.0 and later, Windows 98: Indicates whether windows activated through active window tracking will be brought to the top. The pvParam parameter must point to a BOOL variable that receives TRUE for on, or FALSE for off. |
SPI_GETACTIVEWNDTRKTIMEOUT | Windows NT 5.0 and later, Windows 98: Indicates the active window tracking delay, in milliseconds. The pvParam parameter must point to a DWORD variable that receives the time. |
SPI_GETANIMATION | Retrieves the animation effects associated with user actions. The pvParam parameter must point to an ANIMATIONINFO structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(ANIMATIONINFO). |
SPI_GETBEEP | Indicates whether the warning beeper is on. The pvParam parameter must point to a BOOL variable that receives TRUE if the beeper is on, or FALSE if it is off. |
SPI_GETBORDER | Retrieves the border multiplier factor that determines the width of a window's sizing border. The pvParam parameter must point to an integer variable that receives this value. |
SPI_GETCOMBOBOXANIMATION | Windows NT 5.0 and later, Windows 98: Indicates whether the slide-open effect for combo boxes is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE for enabled, or FALSE for disabled. |
SPI_GETDEFAULTINPUTLANG | Returns the keyboard layout handle for the system default input language. The pvParam parameter must point to the 32-bit variable that receives this value. |
SPI_GETDRAGFULLWINDOWS | Determines whether dragging of full windows is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. |
SPI_GETFASTTASKSWITCH | This flag is obsolete. Previous versions of the system use this flag to determine whether ALT+TAB fast task switching is enabled. For Windows 95, Windows 98, and Windows NT version 4.0, fast task switching is always enabled. See SPI_GETSWITCHTASKDISABLE. |
SPI_GETFILTERKEYS | Retrieves information about the FilterKeys accessibility feature. The pvParam parameter must point to a FILTERKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(FILTERKEYS). |
SPI_GETFONTSMOOTHING | Indicates whether the font smoothing feature is enabled. This feature uses font anti-aliasing to make font curves appear smoother by painting pixels at different gray levels. The pvParam parameter must point to a BOOL variable that receives TRUE if the feature is enabled, or FALSE if it is not. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. |
SPI_GETFOREGROUNDFLASHCOUNT | Windows NT 5.0 and later, Windows 98: Indicates the number of times SetForegroundWindow will flash the taskbar button when rejecting a foreground switch request. The pvParam parameter must point to a DWORD variable that receives the value. |
SPI_GETFOREGROUNDLOCKTIMEOUT | Windows NT 5.0 and later, Windows 98: Indicates the amount of time following user input, in milliseconds, during which the system will not allow applications to force themselves into the foreground. The pvParam parameter must point to a DWORD variable that receives the time. |
SPI_GETGRADIENTCAPTIONS | Windows NT 5.0 and later, Windows 98: Indicates whether the gradient effect for window title bars is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE for enabled, or FALSE for disabled. For more information about the gradient effect, see the GetSysColor function. |
SPI_GETGRIDGRANULARITY | Retrieves the current granularity value of the desktop sizing grid. The pvParam parameter must point to an integer variable that receives the granularity. |
SPI_GETHIGHCONTRAST | Windows 95 and later, Windows NT 5.0 and later: Retrieves information about the HighContrast accessibility feature. The pvParam parameter must point to a HIGHCONTRAST structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(HIGHCONTRAST). |
SPI_GETICONMETRICS | Retrieves the metrics associated with icons. The pvParam parameter must point to an ICONMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(ICONMETRICS). |
SPI_GETICONTITLELOGFONT | Retrieves the logical font information for the current icon-title font. The uiParam parameter specifies the size of a LOGFONT structure, and the pvParam parameter must point to the LOGFONT structure to fill in. |
SPI_GETICONTITLEWRAP | Determines whether icon-title wrapping is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. |
SPI_GETKEYBOARDDELAY | Retrieves the keyboard repeat-delay setting, which is a value in the range from 0 (approximately 250 ms delay) through 3 (approximately 1 second delay). The actual delay associated with each value may vary depending on the hardware. The pvParam parameter must point to an integer variable that receives the setting. |
SPI_GETKEYBOARDPREF | Windows 95 and later, Windows NT 5.0 and later: Determines whether the user relies on the keyboard instead of the mouse, and wants applications to display keyboard interfaces that would otherwise be hidden. The pvParam parameter must point to a BOOL variable that receives TRUE if the user relies on the keyboard; or FALSE otherwise. |
SPI_GETKEYBOARDSPEED | Retrieves the keyboard repeat-speed setting, which is a value in the range from 0 (approximately 30 repetitions per second) through 31 (approximately 2.5 repetitions per second). The actual repeat rates are hardware-dependent and may vary from a linear scale by as much as 20%. The pvParam parameter must point to a DWORD variable that receives the setting. |
SPI_GETLISTBOXSMOOTHSCROLLING | Windows NT 5.0 and later, Windows 98: Indicates whether the smooth-scrolling effect for list boxes is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE for enabled, or FALSE for disabled. |
SPI_GETLOWPOWERACTIVE | Determines whether the low-power phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE if disabled. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_GETLOWPOWERTIMEOUT | Retrieves the time-out value for the low-power phase of screen saving. The pvParam parameter must point to an integer variable that receives the value. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_GETMENUDROPALIGNMENT | Determines whether pop-up menus are left-aligned or right-aligned, relative to the corresponding menu-bar item. The pvParam parameter must point to a BOOL variable that receives TRUE if left-aligned, or FALSE otherwise. |
SPI_GETMINIMIZEDMETRICS | Retrieves the metrics associated with minimized windows. The pvParam parameter must point to a MINIMIZEDMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS). |
SPI_GETMOUSE | Retrieves the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three integers that receives these values. See mouse_event for further information. |
SPI_GETMOUSEHOVERHEIGHT | Windows NT 4.0 and later, Windows 98: Gets the height, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the height. |
SPI_GETMOUSEHOVERTIME | Windows NT 4.0 and later, Windows 98: Gets the time, in milliseconds, that the mouse pointer has to stay in the hover rectangle for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the time. |
SPI_GETMOUSEHOVERWIDTH | Windows NT 4.0 and later, Windows 98: Gets the width, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParam parameter must point to a UINT variable that receives the width. |
SPI_GETMOUSEKEYS | Retrieves information about the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(MOUSEKEYS). |
SPI_GETMOUSESPEED | Windows NT 5.0 and later, Windows 98: Retrieves the current mouse speed. The mouse speed determines how far the pointer will move based on the distance the mouse moves. The pvParam parameter must point to an integer that receives a value which ranges between 1 (slowest) and 20 (fastest). A value of 10 is the default. The value can be set by an end user using the mouse control panel application or by an application using SPI_SETMOUSESPEED. |
SPI_GETMOUSETRAILS | Windows 95 and later: Indicates whether the Mouse Trails feature is enabled. This feature improves the visibility of mouse cursor movements by briefly showing a trail of cursors and quickly erasing them. The pvParam parameter must point to an integer variable that receives a value. If the value is zero or 1, the feature is disabled. If the value is greater than 1, the feature is enabled and the value indicates the number of cursors drawn in the trail. The uiParam parameter is not used. |
SPI_GETNONCLIENTMETRICS | Retrieves the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a NONCLIENTMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(NONCLIENTMETRICS). |
SPI_GETPOWEROFFACTIVE | Determines whether the power-off phase of screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE if disabled. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_GETPOWEROFFTIMEOUT | Retrieves the time-out value for the power-off phase of screen saving. The pvParam parameter must point to an integer variable that receives the value. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_GETSCREENREADER | Windows 95 and later, Windows NT 5.0 and later: Determines whether a screen reviewer utility is running. A screen reviewer utility directs textual information to an output device, such as a speech synthesizer or Braille display. When this flag is set, an application should provide textual information in situations where it would otherwise present the information graphically. The pvParam parameter is a pointer to a BOOL variable that receives TRUE if a screen reviewer utility is running, or FALSE otherwise. |
SPI_GETSCREENSAVEACTIVE | Determines whether screen saving is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if screen saving is enabled, or FALSE otherwise. |
SPI_GETSCREENSAVERRUNNING | Windows NT 5.0 and later, Windows 98: Determines whether a screen saver is currently running on the window station of the calling process. The pvParam parameter must point to a BOOL variable that receives TRUE if a screen saver is currently running, or FALSE otherwise. Note that only the interactive window station, "WinSta0", can have a screen saver running. |
SPI_GETSCREENSAVETIMEOUT | Retrieves the screen saver time-out value, in seconds. The pvParam parameter must point to an integer variable that receives the value. |
SPI_GETSERIALKEYS | Windows 95 and later: Retrieves information about the SerialKeys accessibility feature. The pvParam parameter must point to a SERIALKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(SERIALKEYS). |
SPI_GETSHOWSOUNDS | Determines whether the Show Sounds accessibility flag is on or off. If it is on, the user requires an application to present information visually in situations where it would otherwise present the information only in audible form. The pvParam parameter must point to a BOOL variable that receives TRUE if the feature is on, or FALSE if it is off. Using this value is equivalent to calling GetSystemMetrics (SM_SHOWSOUNDS). That is the recommended call. |
SPI_GETSNAPTODEFBUTTON | Windows NT 4.0 and later, Windows 98: Determines whether the snap-to-default-button feature is enabled. If enabled, the mouse cursor automatically moves to the default button, such as "OK" or "Apply", of a dialog box. The pvParam parameter must point to a BOOL variable that receives TRUE if the feature is on, or FALSE if it is off. |
SPI_GETSOUNDSENTRY | Retrieves information about the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRY structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(SOUNDSENTRY). |
SPI_GETSTICKYKEYS | Retrieves information about the StickyKeys accessibility feature. The pvParam parameter must point to a STICKYKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(STICKYKEYS). |
SPI_GETSWITCHTASKDISABLE | Windows NT 5.0 and later: Determines whether ALT+TAB and ALT+ESC task switching is enabled. The pvParam parameter must point to a UINT variable that receives 1 if task switching is disabled, or zero if it is enabled. By default, task switching is enabled. |
SPI_GETTOGGLEKEYS | Retrieves information about the ToggleKeys accessibility feature. The pvParam parameter must point to a TOGGLEKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(TOGGLEKEYS). |
SPI_GETWHEELSCROLLLINES | Windows NT 4.0 and later, Windows 98: Gets the number of lines to scroll when the mouse wheel is rotated. The pvParam parameter must point to a UINT variable that receives the number of lines. The default value is 3. |
SPI_GETWINDOWSEXTENSION | Windows 95: Indicates whether the Windows extension, Windows Plus!, is installed. Set the uiParam parameter to 1. The pvParam parameter is not used. The function returns TRUE if the extension is installed, or FALSE if it is not. |
SPI_GETWORKAREA | Retrieves the size of the work area on the primary display monitor. The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. The pvParam parameter must point to a RECT structure that receives the coordinates of the work area, expressed in virtual screen coordinates. To get the work area of a monitor other than the primary display monitor, call the GetMonitorInfo function. |
SPI_ICONHORIZONTALSPACING | Sets the width of an icon cell. The uiParam parameter specifies the width, in pixels. |
SPI_ICONVERTICALSPACING | Sets the height of an icon cell. The uiParam parameter specifies the height, in pixels. |
SPI_LANGDRIVER | Not implemented. |
SPI_SCREENSAVERRUNNING | Renamed to SPI_SETSCREENSAVERRUNNING. |
SPI_SETACCESSTIMEOUT | Sets the time-out period associated with the accessibility features. The pvParam parameter must point to an ACCESSTIMEOUT structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ACCESSTIMEOUT). |
SPI_SETACTIVEWINDOWTRACKING | Windows NT 5.0 and later, Windows 98: Sets active window tracking (activating the window the mouse is on) either on or off. Set pvParam to TRUE for on or FALSE for off. |
SPI_SETACTIVEWNDTRKZORDER | Windows NT 5.0 and later, Windows 98: Indicates whether or not windows activated through active window tracking should be brought to the top. Set pvParam to TRUE for on or FALSE for off. |
SPI_SETACTIVEWNDTRKTIMEOUT | Windows NT 5.0 and later, Windows 98: Sets the active window tracking delay. Set pvParam to the number of milliseconds to delay before activating the window under the mouse pointer. |
SPI_SETANIMATION | Sets the animation effects associated with user actions. The pvParam parameter must point to an ANIMATIONINFO structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ANIMATIONINFO). |
SPI_SETBEEP | Turns the warning beeper on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. |
SPI_SETBORDER | Sets the border multiplier factor that determines the width of a window's sizing border. The uiParam parameter specifies the new value. |
SPI_SETCOMBOBOXANIMATION | Windows NT 5.0 and later, Windows 98: Enables or disables the slide-open effect for combo boxes. Set the pvParam parameter to TRUE to enable the gradient effect, or FALSE to disable it. |
SPI_SETCURSORS | Reloads the system cursors. Set the uiParam parameter to zero and the pvParam parameter to NULL |
SPI_SETDEFAULTINPUTLANG | Sets the default input language for the system shell and applications. The specified language must be displayable using the current system character set. The pvParam parameter must point to a DWORD variable that contains the keyboard layout handle for the default language. |
SPI_SETDESKPATTERN | Sets the current desktop pattern by causing Windows to read the Pattern= setting from the WIN.INI file. |
SPI_SETDESKWALLPAPER | Sets the desktop wallpaper. The pvParam parameter must point to a null-terminated string containing the name of a bitmap file. |
SPI_SETDOUBLECLICKTIME | Sets the double-click time for the mouse to the value of the uiParam parameter. The double-click time is the maximum number of milliseconds that can occur between the first and second clicks of a double-click. You can also call the SetDoubleClickTime function to set the double-click time. To get the current double-click time, call the GetDoubleClickTime function. |
SPI_SETDOUBLECLKHEIGHT | Sets the height of the double-click rectangle to the value of the uiParam parameter. The double-click rectangle is the rectangle within which the second click of a double-click must fall for it to be registered as a double-click. |
SPI_SETDOUBLECLKWIDTH | Sets the width of the double-click rectangle to the value of the uiParam parameter. The double-click rectangle is the rectangle within which the second click of a double-click must fall for it to be registered as a double-click. |
SPI_SETDRAGFULLWINDOWS | Sets dragging of full windows either on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. |
SPI_SETDRAGHEIGHT | Sets the height, in pixels, of the rectangle used to detect the start of a drag operation. See SM_CXDRAG and SM_CYDRAG in the table under the nIndex parameter of GetSystemMetrics. |
SPI_SETDRAGWIDTH | Sets the width, in pixels, of the rectangle used to detect the start of a drag operation. See SM_CXDRAG and SM_CYDRAG in the table under the nIndex parameter of GetSystemMetrics. |
SPI_SETFASTTASKSWITCH | This flag is obsolete. Previous versions of the system use this flag to enable or disable ALT+TAB fast task switching. For Windows 95, Windows 98, and Windows NT version 4.0, fast task switching is always enabled. See SPI_SETSWITCHTASKDISABLE. |
SPI_SETFILTERKEYS | Sets the parameters of the FilterKeys accessibility feature. The pvParam parameter must point to a FILTERKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(FILTERKEYS). |
SPI_SETFONTSMOOTHING | Enables or disables the font smoothing feature, which uses font anti-aliasing to make font curves appear smoother by painting pixels at different gray levels. To enable the feature, set the uiParam parameter to TRUE. To disable the feature, set uiParam to FALSE. Windows 95: This flag is supported only if Windows Plus! is installed. See SPI_GETWINDOWSEXTENSION. |
SPI_SETFOREGROUNDFLASHCOUNT | Windows NT 5.0 and later, Windows 98: Sets the number of times SetForegroundWindow will flash the taskbar button when rejecting a foreground switch request. Set pvParam to the number of times to flash. |
SPI_SETFOREGROUNDLOCKTIMEOUT | Windows NT 5.0 and later, Windows 98: Sets the amount of time following user input, in milliseconds, during which the system will not allow applications to force themselves into the foreground. Set pvParam to the new timeout value. |
SPI_SETGRADIENTCAPTIONS | Windows NT 5.0 and later, Windows 98: Enables or disables the gradient effect for window title bars. Set the pvParam parameter to TRUE to enable it, or FALSE to disable it. For more information about the gradient effect, see the GetSysColor function. |
SPI_SETGRIDGRANULARITY | Sets the granularity of the desktop sizing grid to the value of the uiParam parameter. |
SPI_SETHANDHELD | Used internally; applications should not use this value. |
SPI_SETHIGHCONTRAST | Windows 95 and later, Windows NT 5.0 and later: Sets the parameters of the HighContrast accessibility feature. The pvParam parameter must point to a HIGHCONTRAST structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(HIGHCONTRAST). |
SPI_SETICONMETRICS | Sets the metrics associated with icons. The pvParam parameter must point to an ICONMETRICS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ICONMETRICS). |
SPI_SETICONS | Reloads the system icons. Set the uiParam parameter to zero and the pvParam parameter to NULL |
SPI_SETICONTITLELOGFONT | Sets the font that is used for icon titles. The uiParam parameter specifies the size of a LOGFONT structure, and the pvParam parameter must point to a LOGFONT structure. |
SPI_SETICONTITLEWRAP | Turns icon-title wrapping on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. |
SPI_SETKEYBOARDDELAY | Sets the keyboard repeat-delay setting. The uiParam parameter must specify 0, 1, 2, or 3, where zero sets the shortest delay (approximately 250 ms) and 3 sets the longest delay (approximately 1 second). The actual delay associated with each value may vary depending on the hardware. |
SPI_SETKEYBOARDPREF | Windows 95 and later, Windows NT 5.0 and later: Sets the keyboard preference. The uiParam parameter specifies TRUE if the user relies on the keyboard instead of the mouse, and wants applications to display keyboard interfaces that would otherwise be hidden; uiParam is FALSE otherwise. |
SPI_SETKEYBOARDSPEED | Sets the keyboard repeat-speed setting. The uiParam parameter must specify a value in the range from 0 through 31, where zero sets the fastest speed (approximately 30 repetitions per second) and 31 sets the slowest speed (approximately 2.5 repetitions per second). The actual repeat rates are hardware-dependent and may vary from a linear scale by as much as 20%. If uiParam is greater than 31, the parameter is set to 31. |
SPI_SETLANGTOGGLE | Sets the hot key set for switching between input languages. The uiParam and pvParam parameters are not used. The value sets the shortcut keys in the keyboard property sheets by reading the registry again. The registry must be set before this flag is used. the path in the registry is \HKEY_CURRENT_USER\keyboard layout\toggle. Valid values are "1" = alt+shift, "2" = ctrl+shift, and "3" = none. |
SPI_SETLISTBOXSMOOTHSCROLLING | Windows NT 5.0 and later, Windows 98: Enables or disables the smooth-scrolling effect for list boxes. Set the pvParam parameter to TRUE to enable the smooth-scrolling effect, or FALSE to disable it. |
SPI_SETLOWPOWERACTIVE | Activates or deactivates the low-power phase of screen saving. Set uiParam to 1 to activate, or zero to deactivate. The pvParam parameter must be NULL. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_SETLOWPOWERTIMEOUT | Sets the time-out value, in seconds, for the low-power phase of screen saving. The uiParam parameter specifies the new value. The pvParam parameter must be NULL. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_SETMENUDROPALIGNMENT | Sets the alignment value of pop-up menus. The uiParam parameter specifies TRUE for right alignment, or FALSE for left alignment. |
SPI_SETMINIMIZEDMETRICS | Sets the metrics associated with minimized windows. The pvParam parameter must point to a MINIMIZEDMETRICS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS). |
SPI_SETMOUSE | Sets the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three integers that specifies these values. See mouse_event for further information. |
SPI_SETMOUSEBUTTONSWAP | Swaps or restores the meaning of the left and right mouse buttons. The uiParam parameter specifies TRUE to swap the meanings of the buttons, or FALSE to to restore their original meanings. |
SPI_SETMOUSEHOVERHEIGHT | Windows NT 4.0 and later, Windows 98: Sets the height, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. Set the uiParam parameter to the new height. |
SPI_SETMOUSEHOVERTIME | Windows NT 4.0 and later, Windows 98: Sets the time, in milliseconds, that the mouse pointer has to stay in the hover rectangle for TrackMouseEvent to generate a WM_MOUSEHOVER message. This is used only if you pass HOVER_DEFAULT in the dwHoverTime parameter in the call to TrackMouseEvent. Set the uiParam parameter to the new time. |
SPI_SETMOUSEHOVERWIDTH | Windows NT 4.0 and later, Windows 98: Sets the width, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. Set the uiParam parameter to the new width. |
SPI_SETMOUSEKEYS | Sets the parameters of the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(MOUSEKEYS). |
SPI_SETMOUSESPEED | Windows NT 5.0 and later, Windows 98: Sets the current mouse speed. The pvParam parameter must point to an integer between 1 (slowest) and 20 (fastest). A value of 10 is the default. This value is typically set using the mouse control panel application. |
SPI_SETMOUSETRAILS | Windows 95 and later: Enables or disables the Mouse Trails feature, which improves the visibility of mouse cursor movements by briefly showing a trail of cursors and quickly erasing them. To disable the feature, set the uiParam parameter to zero or 1. To enable the feature, set uiParam to a value greater than 1 to indicate the number of cursors drawn in the trail. |
SPI_SETNONCLIENTMETRICS | Sets the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a NONCLIENTMETRICS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(NONCLIENTMETRICS). |
SPI_SETPENWINDOWS | Windows 95 and later: Specifies that pen windows is being loaded or unloaded. The uiParam parameter is TRUE when loading and FALSE when unloading pen windows. The pvParam parameter is NULL. |
SPI_SETPOWEROFFACTIVE | Activates or deactivates the power-off phase of screen saving. Set uiParam to 1 to activate, or zero to deactivate. The pvParam parameter must be NULL. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_SETPOWEROFFTIMEOUT | Sets the time-out value, in seconds, for the power-off phase of screen saving. The uiParam parameter specifies the new value. The pvParam parameter must be NULL. Windows 98: This flag is supported for 16-bit and 32-bit applications. Windows 95: This flag is supported for 16-bit applications only. Windows NT: This flag is supported for 32-bit applications on Windows NT versions 5.0 and later. It is not supported for 16-bit applications. |
SPI_SETSCREENREADER | Windows 95 and later, Windows NT 5.0 and later: Indicates whether a screen review utility is running. The uiParam parameter specifies TRUE for on, or FALSE for off. |
SPI_SETSCREENSAVEACTIVE | Sets the state of the screen saver. The uiParam parameter specifies TRUE to activate screen saving, or FALSE to deactivate it. |
SPI_SETSCREENSAVERRUNNING | Windows 95 and later: Used internally; applications should not use this flag. |
SPI_SETSCREENSAVETIMEOUT | Sets the screen saver time-out value to the value of the uiParam parameter. This value is the amount of time, in seconds, that the system must be idle before the screen saver activates. |
SPI_SETSERIALKEYS | Windows 95 and later: Sets the parameters of the SerialKeys accessibility feature. The pvParam parameter must point to a SERIALKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(SERIALKEYS). |
SPI_SETSHOWSOUNDS | Sets the ShowSounds accessibility feature as on or off. The uiParam parameter specifies TRUE for on, or FALSE for off. |
SPI_SETSNAPTODEFBUTTON | Windows NT 4.0 and later, Windows 98: Enables or disables the snap-to-default-button feature. If enabled, the mouse cursor automatically moves to the default button, such as OK or Apply, of a dialog box. Set the uiParam parameter to TRUE to enable the feature, or FALSE to disable it. |
SPI_SETSOUNDSENTRY | Sets the parameters of the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRY structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(SOUNDSENTRY). |
SPI_SETSTICKYKEYS | Sets the parameters of the StickyKeys accessibility feature. The pvParam parameter must point to a STICKYKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(STICKYKEYS). |
SPI_SETSWITCHTASKDISABLE | Windows NT 5.0 and later: Enables or disables ALT+TAB and ALT+ESC task switching. Set the uiParam parameter to 1 to enable the feature, or zero to disable it. By default, task switching is enabled. |
SPI_SETTOGGLEKEYS | Sets the parameters of the ToggleKeys accessibility feature. The pvParam parameter must point to a TOGGLEKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(TOGGLEKEYS). |
SPI_SETWHEELSCROLLLINES | Windows NT 4.0 and later, Windows 98: Sets the number of lines to scroll when the mouse wheel is rotated. The number of lines is set from the uiParam parameter. The number of lines is the suggested number of lines to scroll when the mouse wheel is rolled without using modifier keys. If the number is 0, then no scrolling should occur. If the number of lines to scroll is greater than the number of lines viewable, and in particular if it is WHEEL_PAGESCROLL (#defined as UINT_MAX), the scroll operation should be interpreted as clicking once in the page down or page up regions of the scroll bar. |
SPI_SETWORKAREA | Sets the size of the work area. The work area is the portion of the screen not obscured by the system taskbar or by application desktop toolbars. The pvParam parameter is a pointer to a RECT structure that specifies the new work area rectangle, expressed in virtual screen coordinates. In a system with multiple display monitors, the function sets the work area of the monitor that contains the specified rectangle. If pvParam is NULL, the function sets the work area of the primary display monitor to the full screen. |
Value | Action |
---|---|
SPIF_UPDATEINIFILE | Writes the new system-wide parameter setting to the user profile. |
SPIF_SENDCHANGE | Broadcasts the WM_SETTINGCHANGE message after updating the user profile. |
SPIF_SENDWININICHANGE | Same as SPIF_SENDCHANGE. |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
This function is intended for use with applications, such as the Control Panel, that allow the user to customize the Windows environment.
A keyboard layout name should be derived from the hexadecimal value of the language identifier corresponding to the layout. For example, U.S. English has a language identifier of 0x0409, so the primary U.S. English layout is named "00000409." Variants of U.S. English layout, such as the Dvorak layout, are named "00010409," "00020409" and so on. For a list of the primary language identifiers and sublanguage identifiers that make up a language identifier, see the MAKELANGID macro.
Windows CE: Windows CE supports only the following uiAction values:
If the pvParam buffer used to get the platform type or OEM information string is too small, this function fails with ERROR_INSUFFICIENT_BUFFER in the last error.
Windows CE supports only the UNICODE version of this function.
Windows CE does not support the SPIF_SENDWININICHANGE value for the fWinIni parameter.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
System Information Overview, System Information Functions, ACCESSTIMEOUT, ANIMATIONINFO, FILTERKEYS, GetLastError, GetSystemMetrics, HIGHCONTRAST, ICONMETRICS, LOGFONT, MAKELANGID, MINIMIZEDMETRICS, mouse_event, MOUSEKEYS, NONCLIENTMETRICS, RECT, SERIALKEYS, SetForegroundWindow, SOUNDSENTRY, STICKYKEYS, TOGGLEKEYS, TrackMouseEvent WM_SETTINGCHANGE