SystemParametersInfo라는 함수가 있다.

이런저런 윈도우의 설정들을 가져 올수 있게 해주는 건데 화면 우측 하단에 특정 이미지를 출력하고 싶어서 찾아가 발견했다.

CRect rtWnd;
::SystemParametersInfo(SPI_GETWORKAREA,0,&rtWnd,0);

요렿게 쓰면 rtWnd에 실 화면의 크기 정보가 얻어진다. 무슨말이냐면 아래쪽 Tray를 제외한 부분이라는거다.
하지만 이렇게 하면 듀얼이상의 모니터를 사용할 경우 1번 모니터의 정보만 얻어오므로 GetMonitorInfo를 사용해야 한다.

그외에 배경화면을 바꾸는 것으로는 

::SystemParametersInfo(SPI_GETDESKWALLPAPER, 0, path, SPFI_SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); 


가 있다. Vista 이상에서만 jpg가 가능하고 그 외에는 모두 bmp만 인식한다.

반대로 현재의 배경화면을 가져오는 것은 Get을 Set으로 바꾸면 완료.

::SystemParametersInfo(SPI_SETDESKWALLPAPER, MAX_PATH, szPath, 0);

기타 parameter들에 대한 설명은 MSDN에서.

SystemParametersInfo Function


Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter.


BOOL WINAPI SystemParametersInfo(
  __in          UINT uiAction,
  __in          UINT uiParam,
  __in_out      PVOID pvParam,
  __in          UINT fWinIni
);

Parameters

uiAction

The system-wide parameter to be retrieved or set. This parameter can be one of the following values. They are organized in tables of related parameters.

The following parameters are new for Windows Vista.

ValueMeaning

SPI_GETAUDIODESCRIPTION

Determines whether audio descriptions are enabled or disabled. The pvParam parameter is a pointer to anAUDIODESCRIPTION structure. Set the cbSizemember of this structure and the uiParam parameter tosizeof(AUDIODESCRIPTION).

While it is possible for users who have visual impairments to hear the audio in video content, there is a lot of action in video that does not have corresponding audio. Specific audio description of what is happening in a video helps these users understand the content better. This flag enables you to determine whether audio descriptions have been enabled and in which language.

SPI_GETCLEARTYPE

TBD

SPI_GETCLIENTAREAANIMATION

Determines whether animations are enabled or disabled. The pvParam parameter must point to aBOOL variable that receives TRUE if animations are disabled, or FALSE otherwise.

Display features such as flashing, blinking, flickering, and moving content can cause seizures in users with photo-sensitive epilepsy. This flag enables you to determine whether such animations have been disabled in the client area.

SPI_GETDISABLEOVERLAPPEDCONTENT

Determines whether overlapped content is enabled or disabled. The pvParam parameter must point to aBOOL variable that receives TRUE if enabled, or FALSE otherwise.

Display features such as background images, textured backgrounds, water marks on documents, alpha-blending, and transparency can reduce the contrast between the foreground and background, making it harder for users with low vision to see objects on the screen. This flag enables you to determine whether such overlapped content has been disabled.

SPI_GETMESSAGEDURATION

Retrieves the time that notification pop-ups should be displayed, in seconds. The pvParam parameter must point to a ULONG that receives the message duration.

Users with visual impairments or cognitive conditions such as ADHD and dyslexia might need a longer time to read the text in notification messages. This flag enables you to retrieve the message duration.

SPI_GETSCREENSAVESECURE

TBD

SPI_GETSPEECHRECOGNITION

Determines whether speech recognition is running. The pvParam parameter must point to a BOOLvariable that receives TRUE if speech recognition is running and FALSE otherwise.

Speech recognition monitors running applications and enables the user to interact with the PC by voice to control menus, buttons, and other UI elements, as well as enables the user to convert their voice into text inside a variety of edit-like controls.

SPI_SETAUDIODESCRIPTION

Turns the audio descriptions feature on or off. ThepvParam parameter is a pointer to anAUDIODESCRIPTION structure.

While it is possible for users who are visually impaired to hear the audio in video content, there is a lot of action in video that does not have corresponding audio. Specific audio description of what is happening in a video helps these users understand the content better. This flag enables you to enable or disable audio descriptions in the languages they are provided in.

SPI_SETCLEARTYPE

TBD

SPI_SETCLIENTAREAANIMATION

Turns client area animations on or off. The pvParamparameter is a BOOL variable. Set pvParam to TRUE to disable animations and other transient effects in the client area, or FALSE to enable them.

Display features such as flashing, blinking, flickering, and moving content can cause seizures in users with photo-sensitive epilepsy. This flag enables you to enable or disable all such animations.

SPI_SETDISABLEOVERLAPPEDCONTENT

Turns overlapped content (such as background images and watermarks) on or off. The pvParamparameter is a BOOL variable. Set pvParam to TRUE to disable overlapped content, or FALSE to enable overlapped content.

Display features such as background images, textured backgrounds, water marks on documents, alpha-blending, and transparency can reduce the contrast between the foreground and background, making it harder for users with low vision to see objects on the screen. This flag enables you to enable or disable all such overlapped content.

SPI_SETMESSAGEDURATION

Sets the time that notification pop-ups should be displayed, in seconds. The pvParam parameter must point to a ULONG that specifies the message duration.

Users with visual impairments or cognitive conditions such as ADHD and dyslexia might need a longer time to read the text in notification messages. This flag enables you to set the message duration.

SPI_SETSCREENSAVESECURE

TBD

SPI_SETSPEECHRECOGNITION

Turns a speech recognition utility on or off. SetpvParam to TRUE to turn on the utility, or FALSE otherwise.

The following are the accessibility parameters.

Accessibility parameterMeaning

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 theuiParam parameter to sizeof(ACCESSTIMEOUT).

SPI_GETFILTERKEYS

Retrieves information about the FilterKeys accessibility feature. The pvParam parameter must point to a FILTERKEYSstructure that receives the information. Set the cbSize member of this structure and the uiParam parameter tosizeof(FILTERKEYS).

SPI_GETFOCUSBORDERHEIGHT

Retrieves the height, in pixels, of the top and bottom edges of the focus rectangle drawn with DrawFocusRect. ThepvParam parameter must point to a UINT value.

Windows 2000: This value is not supported until Windows XP.

SPI_GETFOCUSBORDERWIDTH

Retrieves the width, in pixels, of the left and right edges of the focus rectangle drawn with DrawFocusRect. The pvParamparameter must point to a UINT.

Windows 2000: This value is not supported until Windows XP.

SPI_GETHIGHCONTRAST

Retrieves information about the HighContrast accessibility feature. The pvParam parameter must point to aHIGHCONTRAST structure that receives the information. Set the cbSize member of this structure and the uiParamparameter to sizeof(HIGHCONTRAST).

For a general discussion, see Remarks.

SPI_GETMOUSECLICKLOCK

Retrieves the state of the Mouse ClickLock feature. ThepvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_GETMOUSECLICKLOCKTIME

Retrieves the time delay before the primary mouse button is locked. The pvParam parameter must point to DWORD that receives the time delay, in milliseconds. This is only enabled if SPI_SETMOUSECLICKLOCK is set to TRUE. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_GETMOUSEKEYS

Retrieves information about the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYSstructure that receives the information. Set the cbSize member of this structure and the uiParam parameter tosizeof(MOUSEKEYS).

SPI_GETMOUSESONAR

Retrieves the state of the Mouse Sonar feature. The pvParamparameter must point to a BOOL variable that receives TRUE if enabled or FALSE otherwise. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_GETMOUSEVANISH

Retrieves the state of the Mouse Vanish feature. The pvParamparameter must point to a BOOL variable that receives TRUE if enabled or FALSE otherwise. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_GETSCREENREADER

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_GETSERIALKEYS

The user should control this setting through the Control Panel.

Windows Me/98/95: Retrieves information about the SerialKeys accessibility feature. The pvParamparameter must point to a SERIALKEYS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter tosizeof(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 pvParamparameter 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 GetSystemMetricswith SM_SHOWSOUNDS. That is the recommended call.

SPI_GETSOUNDSENTRY

Retrieves information about the SoundSentry accessibility feature. The pvParam parameter must point to aSOUNDSENTRY structure that receives the information. Set the cbSize member of this structure and the uiParamparameter to sizeof(SOUNDSENTRY).

SPI_GETSTICKYKEYS

Retrieves information about the StickyKeys accessibility feature. The pvParam parameter must point to aSTICKYKEYS structure that receives the information. Set thecbSize member of this structure and the uiParam parameter tosizeof(STICKYKEYS).

SPI_GETTOGGLEKEYS

Retrieves information about the ToggleKeys accessibility feature. The pvParam parameter must point to aTOGGLEKEYS structure that receives the information. Set thecbSize member of this structure and the uiParam parameter tosizeof(TOGGLEKEYS).

SPI_SETACCESSTIMEOUT

Sets the time-out period associated with the accessibility features. The pvParam parameter must point to anACCESSTIMEOUT structure that contains the new parameters. Set the cbSize member of this structure and theuiParam parameter to sizeof(ACCESSTIMEOUT).

SPI_SETFILTERKEYS

Sets the parameters of the FilterKeys accessibility feature. ThepvParam parameter must point to a FILTERKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter tosizeof(FILTERKEYS).

SPI_SETFOCUSBORDERHEIGHT

Sets the height of the top and bottom edges of the focus rectangle drawn with DrawFocusRect to the value of thepvParam parameter.

Windows 2000: This value is not supported until Windows XP.

SPI_SETFOCUSBORDERWIDTH

Sets the height of the left and right edges of the focus rectangle drawn with DrawFocusRect to the value of the pvParamparameter.

Windows 2000: This value is not supported until Windows XP.

SPI_SETHIGHCONTRAST

Sets the parameters of the HighContrast accessibility feature. The pvParam parameter must point to a HIGHCONTRASTstructure that contains the new parameters. Set the cbSizemember of this structure and the uiParam parameter tosizeof(HIGHCONTRAST).

SPI_SETMOUSECLICKLOCK

Turns the Mouse ClickLock accessibility feature on or off. This feature temporarily locks down the primary mouse button when that button is clicked and held down for the time specified by SPI_SETMOUSECLICKLOCKTIME. The uiParam parameter specifies TRUE for on, or FALSE for off. The default is off. For more information, see Remarks and About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_SETMOUSECLICKLOCKTIME

Adjusts the time delay before the primary mouse button is locked. The uiParam parameter specifies the time delay in milliseconds. For example, specify 1000 for a 1 second delay. The default is 1200. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_SETMOUSEKEYS

Sets the parameters of the MouseKeys accessibility feature. The pvParam parameter must point to a MOUSEKEYSstructure that contains the new parameters. Set the cbSizemember of this structure and the uiParam parameter tosizeof(MOUSEKEYS).

SPI_SETMOUSESONAR

Turns the Sonar accessibility feature on or off. This feature briefly shows several concentric circles around the mouse pointer when the user presses and releases the CTRL key. The pvParam parameter specifies TRUE for on and FALSE for off. The default is off. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_SETMOUSEVANISH

Turns the Vanish feature on or off. This feature hides the mouse pointer when the user types; the pointer reappears when the user moves the mouse. The pvParam parameter specifies TRUE for on and FALSE for off. The default is off. For more information, see About Mouse Input.

Windows 2000: This value is not supported until Windows XP.

SPI_SETSCREENREADER

Determines whether a screen review utility is running. TheuiParam parameter specifies TRUE for on, or FALSE for off.

SPI_SETSERIALKEYS

The user controls this feature through the Control Panel.

Windows Me/98/95: Sets the parameters of theSerialKeys accessibility feature. The pvParamparameter must point to a SERIALKEYS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter tosizeof(SERIALKEYS).

SPI_SETSHOWSOUNDS

Turns the ShowSounds accessibility feature on or off. TheuiParam parameter specifies TRUE for on, or FALSE for off.

SPI_SETSOUNDSENTRY

Sets the parameters of the SoundSentry accessibility feature. The pvParam parameter must point to a SOUNDSENTRYstructure that contains the new parameters. Set the cbSizemember of this structure and the uiParam parameter tosizeof(SOUNDSENTRY).

SPI_SETSTICKYKEYS

Sets the parameters of the StickyKeys accessibility feature. The pvParam parameter must point to a STICKYKEYSstructure that contains the new parameters. Set the cbSizemember of this structure and the uiParam parameter tosizeof(STICKYKEYS).

SPI_SETTOGGLEKEYS

Sets the parameters of the ToggleKeys accessibility feature. The pvParam parameter must point to a TOGGLEKEYSstructure that contains the new parameters. Set the cbSizemember of this structure and the uiParam parameter tosizeof(TOGGLEKEYS).

The following are the desktop parameters.

Desktop parameterMeaning

SPI_GETDESKWALLPAPER

Retrieves the full path of the bitmap file for the desktop wallpaper. The pvParam parameter must point to a buffer to receive the null-terminated path string. Set theuiParam parameter to the size, in characters, of thepvParam buffer. The returned string will not exceed MAX_PATH characters. If there is no desktop wallpaper, the returned string is empty.

SPI_GETDROPSHADOW

Determines whether the drop shadow effect is enabled. The pvParam parameter must point to a BOOL variable that returns TRUE if enabled or FALSE if disabled.

Windows 2000: This value is not supported until Windows XP.

SPI_GETFLATMENU

Determines whether native User menus have flat menu appearance. The pvParam parameter must point to aBOOL variable that returns TRUE if the flat menu appearance is set, or FALSE otherwise.

Windows 2000: This value is not supported until Windows XP.

SPI_GETFONTSMOOTHING

Determines whether the font smoothing feature is enabled. This feature uses font antialiasing 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.

SPI_GETFONTSMOOTHINGCONTRAST

Retrieves a contrast value that is used in ClearTypesmoothing. The pvParam parameter must point to aUINT that receives the information. Valid contrast values are from 1000 to 2200. The default value is 1400.

Windows 2000: This value is not supported until Windows XP.

SPI_GETFONTSMOOTHINGORIENTATION

Retrieves the font smoothing orientation. The pvParamparameter must point to a UINT that receives the information. The possible values are FE_FONTSMOOTHINGORIENTATIONBGR (blue-green-red) and FE_FONTSMOOTHINGORIENTATIONRGB (red-green-blue).

Windows XP/2000: This value is not supported until Windows XP SP2.

SPI_GETFONTSMOOTHINGTYPE

Retrieves the type of font smoothing. The pvParamparameter must point to a UINT that receives the information. The possible values are FE_FONTSMOOTHINGSTANDARD and FE_FONTSMOOTHINGCLEARTYPE.

Windows 2000: This value is not supported until Windows XP.

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 GetMonitorInfofunction.

SPI_SETCURSORS

Reloads the system cursors. Set the uiParamparameter to zero and the pvParam parameter to NULL

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 value of the pvParamparameter determines the new wallpaper. To specify a wallpaper bitmap, set pvParam to point to a null-terminated string containing the full path to the bitmap file. Setting pvParam to "" removes the wallpaper. Setting pvParam to SETWALLPAPER_DEFAULT or NULL reverts to the default wallpaper.

Starting with Windows Vista, pvParam can specify a .jpg file.

SPI_SETDROPSHADOW

Enables or disables the drop shadow effect. SetpvParam to TRUE to enable the drop shadow effect or FALSE to disable it. You must also have CS_DROPSHADOW in the window class style.

Windows 2000: This value is not supported until Windows XP.

SPI_SETFLATMENU

Enables or disables flat menu appearance for native User menus. Set pvParam to TRUE to enable flat menu appearance or FALSE to disable it.

When enabled, the menu bar uses COLOR_MENUBAR for the menubar background, COLOR_MENU for the menu-popup background, COLOR_MENUHILIGHT for the fill of the current menu selection, and COLOR_HILIGHT for the outline of the current menu selection. If disabled, menus are drawn using the same metrics and colors as in Windows 2000.

Windows 2000: This value is not supported until Windows XP.

SPI_SETFONTSMOOTHING

Enables or disables the font smoothing feature, which uses font antialiasing 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.

SPI_SETFONTSMOOTHINGCONTRAST

Sets the contrast value used in ClearType smoothing. The pvParam parameter is the contrast value. Valid contrast values are from 1000 to 2200. The default value is 1400.

SPI_SETFONTSMOOTHINGTYPE must also be set to FE_FONTSMOOTHINGCLEARTYPE.

Windows 2000: This value is not supported until Windows XP.

SPI_SETFONTSMOOTHINGORIENTATION

Sets the font smoothing orientation. The pvParamparameter is either FE_FONTSMOOTHINGORIENTATIONBGR (blue-green-red) or FE_FONTSMOOTHINGORIENTATIONRGB (red-green-blue).

Windows XP/2000: This value is not supported until Windows XP SP2.

SPI_SETFONTSMOOTHINGTYPE

Sets the font smoothing type. The pvParam parameter is either FE_FONTSMOOTHINGSTANDARD, if standard anti-aliasing is used, or FE_FONTSMOOTHINGCLEARTYPE, if ClearType is used. The default is FE_FONTSMOOTHINGSTANDARD.

SPI_SETFONTSMOOTHING must also be set.

Windows 2000: This value is not supported until Windows XP.

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. ThepvParam 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.

The following are the icon parameters.

Icon parameterMeaning

SPI_GETICONMETRICS

Retrieves the metrics associated with icons. The pvParamparameter 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 LOGFONTstructure, and the pvParam parameter must point to theLOGFONT structure to fill in.

SPI_GETICONTITLEWRAP

Determines whether icon-title wrapping is enabled. ThepvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise.

SPI_ICONHORIZONTALSPACING

Sets or retrieves the width, in pixels, of an icon cell. The system uses this rectangle to arrange icons in large icon view.

To set this value, set uiParam to the new value and set pvParamto NULL. You cannot set this value to less than SM_CXICON.

To retrieve this value, pvParam must point to an integer that receives the current value.

SPI_ICONVERTICALSPACING

Sets or retrieves the height, in pixels, of an icon cell.

To set this value, set uiParam to the new value and set pvParamto NULL. You cannot set this value to less than SM_CYICON.

To retrieve this value, pvParam must point to an integer that receives the current value.

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 pvParamparameter 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.

The following are the input parameters. They include parameters related to the keyboard, mouse, input language, and the warning beeper.

Input parameterMeaning

SPI_GETBEEP

Determines 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_GETBLOCKSENDINPUTRESETS

Retrieves a BOOL indicating whether an application can reset the screensaver's timer by calling the SendInputfunction to simulate keyboard or mouse input. The pvParamparameter must point to a BOOL variable that receives TRUE if the simulated input will be blocked, or FALSE otherwise.

SPI_GETDEFAULTINPUTLANG

Retrieves the input locale identifier for the system default input language. The pvParam parameter must point to anHKL variable that receives this value. For more information, see Languages, Locales, and Keyboard Layouts.

SPI_GETKEYBOARDCUES

Determines whether menu access keys are always underlined. The pvParam parameter must point to a BOOLvariable that receives TRUE if menu access keys are always underlined, and FALSE if they are underlined only when the menu is activated by the keyboard.

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

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 pvParamparameter 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 2.5 repetitions per second) through 31 (approximately 30 repetitions per second). The actual repeat rates are hardware-dependent and may vary from a linear scale by as much as 20%. ThepvParam parameter must point to a DWORD variable that receives the setting.

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. Seemouse_event for further information.

SPI_GETMOUSEHOVERHEIGHT

Retrieves the height, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParamparameter must point to a UINT variable that receives the height.

SPI_GETMOUSEHOVERTIME

Retrieves the time, in milliseconds, that the mouse pointer has to stay in the hover rectangle for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParamparameter must point to a UINT variable that receives the time.

SPI_GETMOUSEHOVERWIDTH

Retrieves the width, in pixels, of the rectangle within which the mouse pointer has to stay for TrackMouseEvent to generate a WM_MOUSEHOVER message. The pvParamparameter must point to a UINT variable that receives the width.

SPI_GETMOUSESPEED

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

Determines 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.

Windows 2000: This value is not supported until Windows XP.

SPI_GETSNAPTODEFBUTTON

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_GETWHEELSCROLLCHARS

Retrieves the number of characters to scroll when the horizontal mouse wheel is moved. The pvParam parameter must point to a UINT variable that receives the number of lines. The default value is 3.

SPI_GETWHEELSCROLLLINES

Retrieves the number of lines to scroll when the vertical mouse wheel is moved. The pvParam parameter must point to a UINT variable that receives the number of lines. The default value is 3.

SPI_SETBEEP

Turns the warning beeper on or off. The uiParam parameter specifies TRUE for on, or FALSE for off.

SPI_SETBLOCKSENDINPUTRESETS

Determines whether an application can reset the screensaver's timer by calling the SendInput function to simulate keyboard or mouse input. The uiParam parameter specifies TRUE if the screensaver will not be deactivated by simulated input, or FALSE if the screensaver will be deactivated by simulated input.

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 pvParamparameter must point to an HKL variable that contains the input locale identifier for the default language. For more information, see Languages, Locales, and Keyboard Layouts.

SPI_SETDOUBLECLICKTIME

Sets the double-click time for the mouse to the value of theuiParam 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 theSetDoubleClickTime function to set the double-click time. To get the current double-click time, call theGetDoubleClickTime 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.

To retrieve the height of the double-click rectangle, callGetSystemMetrics with the SM_CYDOUBLECLK flag.

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.

To retrieve the width of the double-click rectangle, callGetSystemMetrics with the SM_CXDOUBLECLK flag.

SPI_SETKEYBOARDCUES

Sets the underlining of menu access key letters. ThepvParam parameter is a BOOL variable. Set pvParam to TRUE to always underline menu access keys, or FALSE to underline menu access keys only when the menu is activated from the keyboard.

SPI_SETKEYBOARDDELAY

Sets the keyboard repeat-delay setting. The uiParamparameter 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

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 uiParamparameter must specify a value in the range from 0 (approximately 2.5 repetitions per second) through 31 (approximately 30 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_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. Seemouse_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 restore their original meanings.

To retrieve the current setting, call GetSystemMetrics with the SM_SWAPBUTTON flag.

SPI_SETMOUSEHOVERHEIGHT

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 uiParamparameter to the new height.

SPI_SETMOUSEHOVERTIME

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 uiParamparameter to the new time.

The time specified should be between USER_TIMER_MAXIMUM and USER_TIMER_MINIMUM. IfuiParam is less than USER_TIMER_MINIMUM, the function will use USER_TIMER_MINIMUM. If uiParam is greater than USER_TIMER_MAXIMUM, the function will be USER_TIMER_MAXIMUM.

Windows Server 2003 and Windows XP: The operating system does not enforce the use of USER_TIMER_MAXIMUM and USER_TIMER_MINIMUM until Windows Server 2003 SP1 and Windows XP SP2.

SPI_SETMOUSEHOVERWIDTH

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 uiParamparameter to the new width.

SPI_SETMOUSESPEED

Sets the current mouse speed. The pvParam parameter is 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

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.

Windows 2000: This value is not supported until Windows XP.

SPI_SETSNAPTODEFBUTTON

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. Applications should use theShowWindow function when displaying a dialog box so the dialog manager can position the mouse cursor.

SPI_SETWHEELSCROLLCHARS

Sets the number of characters to scroll when the horizontal mouse wheel is moved. The number of characters is set from the uiParam parameter.

SPI_SETWHEELSCROLLLINES

Sets the number of lines to scroll when the vertical mouse wheel is moved. The number of lines is set from theuiParam 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.

The following are the menu parameters.

Menu parameterMeaning

SPI_GETMENUDROPALIGNMENT

Determines whether pop-up menus are left-aligned or right-aligned, relative to the corresponding menu-bar item. ThepvParam parameter must point to a BOOL variable that receives TRUE if right-aligned, or FALSE otherwise.

SPI_GETMENUFADE

Determines whether menu fade animation is enabled. ThepvParam parameter must point to a BOOL variable that receives TRUE when fade animation is enabled and FALSE when it is disabled. If fade animation is disabled, menus use slide animation. This flag is ignored unless menu animation is enabled, which you can do using the SPI_SETMENUANIMATION flag. For more information, seeAnimateWindow.

SPI_GETMENUSHOWDELAY

Retrieves the time, in milliseconds, that the system waits before displaying a shortcut menu when the mouse cursor is over a submenu item. The pvParam parameter must point to aDWORD variable that receives the time of the delay.

SPI_SETMENUDROPALIGNMENT

Sets the alignment value of pop-up menus. The uiParamparameter specifies TRUE for right alignment, or FALSE for left alignment.

SPI_SETMENUFADE

Enables or disables menu fade animation. Set pvParam to TRUE to enable the menu fade effect or FALSE to disable it. If fade animation is disabled, menus use slide animation. he The menu fade effect is possible only if the system has a color depth of more than 256 colors. This flag is ignored unless SPI_MENUANIMATION is also set. For more information, seeAnimateWindow.

SPI_SETMENUSHOWDELAY

Sets uiParam to the time, in milliseconds, that the system waits before displaying a shortcut menu when the mouse cursor is over a submenu item.

The following are the power parameters.

Power parameterMeaning

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. This flag is supported for 32-bit applications only.

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. This flag is supported for 32-bit applications only.

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. This flag is supported for 32-bit applications only.

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. This flag is supported for 32-bit applications only.

SPI_SETLOWPOWERACTIVE

Activates or deactivates the low-power phase of screen saving. Set uiParam to 1 to activate, or zero to deactivate. The pvParamparameter must be NULL. This flag is supported for 32-bit applications only.

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. This flag is supported for 32-bit applications only.

SPI_SETPOWEROFFACTIVE

Activates or deactivates the power-off phase of screen saving. SetuiParam to 1 to activate, or zero to deactivate. The pvParamparameter must be NULL. This flag is supported for 32-bit applications only.

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. This flag is supported for 32-bit applications only.

The following are the screen saver parameters.

Screen saver parameterMeaning

SPI_GETSCREENSAVEACTIVE

Determines whether screen saving is enabled. The pvParamparameter must point to a BOOL variable that receives TRUE if screen saving is enabled, or FALSE otherwise.

SPI_GETSCREENSAVERRUNNING

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. ThepvParam parameter must point to an integer variable that receives the value.

SPI_SETSCREENSAVEACTIVE

Sets the state of the screen saver. The uiParam parameter specifies TRUE to activate screen saving, or FALSE to deactivate it.

SPI_SETSCREENSAVETIMEOUT

Sets the screen saver time-out value to the value of theuiParam parameter. This value is the amount of time, in seconds, that the system must be idle before the screen saver activates.

The following are the UI effects. The SPI_SETUIEFFECTS value is used to enable or disable all UI effects at once. This table contains the complete list of UI effect values.

UI effects parameterMeaning

SPI_GETCOMBOBOXANIMATION

Determines 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_GETCURSORSHADOW

Determines whether the cursor has a shadow around it. The pvParam parameter must point to a BOOL variable that receives TRUE if the shadow is enabled, FALSE if it is disabled. This effect appears only if the system has a color depth of more than 256 colors.

SPI_GETGRADIENTCAPTIONS

Determines whether the gradient effect for window title bars is enabled. The pvParam parameter must point to aBOOL variable that receives TRUE for enabled, or FALSE for disabled. For more information about the gradient effect, see the GetSysColor function.

SPI_GETHOTTRACKING

Determines whether hot tracking of user-interface elements, such as menu names on menu bars, is enabled. The pvParam parameter must point to a BOOLvariable that receives TRUE for enabled, or FALSE for disabled.

Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. You can query this value to decide whether to use hot tracking in the user interface of your application.

SPI_GETLISTBOXSMOOTHSCROLLING

Determines 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_GETMENUANIMATION

Determines whether the menu animation feature is enabled. This master switch must be on to enable menu animation effects. The pvParam parameter must point to aBOOL variable that receives TRUE if animation is enabled and FALSE if it is disabled.

If animation is enabled, SPI_GETMENUFADE indicates whether menus use fade or slide animation.

SPI_GETMENUUNDERLINES

Same as SPI_GETKEYBOARDCUES.

SPI_GETSELECTIONFADE

Determines whether the selection fade effect is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled or FALSE if disabled.

The selection fade effect causes the menu item selected by the user to remain on the screen briefly while fading out after the menu is dismissed.

SPI_GETTOOLTIPANIMATION

Determines whether ToolTip animation is enabled. ThepvParam parameter must point to a BOOL variable that receives TRUE if enabled or FALSE if disabled. If ToolTip animation is enabled, SPI_GETTOOLTIPFADE indicates whether ToolTips use fade or slide animation.

SPI_GETTOOLTIPFADE

If SPI_SETTOOLTIPANIMATION is enabled, SPI_GETTOOLTIPFADE indicates whether ToolTip animation uses a fade effect or a slide effect. ThepvParam parameter must point to a BOOL variable that receives TRUE for fade animation or FALSE for slide animation. For more information on slide and fade effects, see AnimateWindow.

SPI_GETUIEFFECTS

Determines whether UI effects are enabled or disabled. The pvParam parameter must point to a BOOL variable that receives TRUE if all UI effects are enabled, or FALSE if they are disabled.

SPI_SETCOMBOBOXANIMATION

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_SETCURSORSHADOW

Enables or disables a shadow around the cursor. ThepvParam parameter is a BOOL variable. Set pvParam to TRUE to enable the shadow or FALSE to disable the shadow. This effect appears only if the system has a color depth of more than 256 colors.

SPI_SETGRADIENTCAPTIONS

Enables or disables the gradient effect for window title bars. Set the pvParam parameter to TRUE to enable it, or FALSE to disable it. The gradient effect is possible only if the system has a color depth of more than 256 colors. For more information about the gradient effect, see theGetSysColor function.

SPI_SETHOTTRACKING

Enables or disables hot tracking of user-interface elements such as menu names on menu bars. Set thepvParam parameter to TRUE to enable it, or FALSE to disable it.

Hot-tracking means that when the cursor moves over an item, it is highlighted but not selected.

SPI_SETLISTBOXSMOOTHSCROLLING

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_SETMENUANIMATION

Enables or disables menu animation. This master switch must be on for any menu animation to occur. ThepvParam parameter is a BOOL variable; set pvParam to TRUE to enable animation and FALSE to disable animation.

If animation is enabled, SPI_GETMENUFADE indicates whether menus use fade or slide animation.

SPI_SETMENUUNDERLINES

Same as SPI_SETKEYBOARDCUES.

SPI_SETSELECTIONFADE

Set pvParam to TRUE to enable the selection fade effect or FALSE to disable it.

The selection fade effect causes the menu item selected by the user to remain on the screen briefly while fading out after the menu is dismissed. The selection fade effect is possible only if the system has a color depth of more than 256 colors.

SPI_SETTOOLTIPANIMATION

Set pvParam to TRUE to enable ToolTip animation or FALSE to disable it. If enabled, you can use SPI_SETTOOLTIPFADE to specify fade or slide animation.

SPI_SETTOOLTIPFADE

If the SPI_SETTOOLTIPANIMATION flag is enabled, use SPI_SETTOOLTIPFADE to indicate whether ToolTip animation uses a fade effect or a slide effect. SetpvParam to TRUE for fade animation or FALSE for slide animation. The tooltip fade effect is possible only if the system has a color depth of more than 256 colors. For more information on the slide and fade effects, see theAnimateWindow function.

SPI_SETUIEFFECTS

Enables or disables UI effects. Set the pvParamparameter to TRUE to enable all UI effects or FALSE to disable all UI effects.

The following are the window parameters.

Window parameterMeaning

SPI_GETACTIVEWINDOWTRACKING

Determines whether active window tracking (activating the window the mouse is on) is on or off. The pvParamparameter must point to a BOOL variable that receives TRUE for on, or FALSE for off.

SPI_GETACTIVEWNDTRKZORDER

Determines whether windows activated through active window tracking will be brought to the top. The pvParamparameter must point to a BOOL variable that receives TRUE for on, or FALSE for off.

SPI_GETACTIVEWNDTRKTIMEOUT

Retrieves the active window tracking delay, in milliseconds. The pvParam parameter must point to aDWORD variable that receives the time.

SPI_GETANIMATION

Retrieves the animation effects associated with user actions. The pvParam parameter must point to anANIMATIONINFO structure that receives the information. Set the cbSize member of this structure and the uiParamparameter to sizeof(ANIMATIONINFO).

SPI_GETBORDER

Retrieves the border multiplier factor that determines the width of a window's sizing border. The pvParamparameter must point to an integer variable that receives this value.

SPI_GETCARETWIDTH

Retrieves the caret width in edit controls, in pixels. ThepvParam parameter must point to a DWORD 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.

SPI_GETFOREGROUNDFLASHCOUNT

Retrieves the number of times SetForegroundWindowwill flash the taskbar button when rejecting a foreground switch request. The pvParam parameter must point to aDWORD variable that receives the value.

SPI_GETFOREGROUNDLOCKTIMEOUT

Retrieves the amount of time following user input, in milliseconds, during which the system will not allow applications to force themselves into the foreground. ThepvParam parameter must point to a DWORD variable that receives the time.

SPI_GETMINIMIZEDMETRICS

Retrieves the metrics associated with minimized windows. The pvParam parameter must point to aMINIMIZEDMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS).

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_GETSHOWIMEUI

Determines whether the IME status window is visible (on a per-user basis). The pvParam parameter must point to a BOOL variable that receives TRUE if the status window is visible, or FALSE if it is not.

SPI_SETACTIVEWINDOWTRACKING

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

Determines whether or not windows activated through active window tracking should be brought to the top. SetpvParam to TRUE for on or FALSE for off.

SPI_SETACTIVEWNDTRKTIMEOUT

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 anANIMATIONINFO structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(ANIMATIONINFO).

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_SETCARETWIDTH

Sets the caret width in edit controls. Set pvParam to the desired width, in pixels. The default and minimum value is 1.

SPI_SETDRAGFULLWINDOWS

Sets dragging of full windows either on or off. TheuiParam parameter specifies TRUE for on, or FALSE for off.

SPI_SETDRAGHEIGHT

Sets the height, in pixels, of the rectangle used to detect the start of a drag operation. Set uiParam to the new value. To retrieve the drag height, callGetSystemMetrics with the SM_CYDRAG flag.

SPI_SETDRAGWIDTH

Sets the width, in pixels, of the rectangle used to detect the start of a drag operation. Set uiParam to the new value. To retrieve the drag width, callGetSystemMetrics with the SM_CXDRAG flag.

SPI_SETFOREGROUNDFLASHCOUNT

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

Sets the amount of time following user input, in milliseconds, during which the system does not allow applications to force themselves into the foreground. SetpvParam to the new timeout value.

The calling thread must be able to change the foreground window, otherwise the call fails.

SPI_SETMINIMIZEDMETRICS

Sets the metrics associated with minimized windows. The pvParam parameter must point to aMINIMIZEDMETRICS structure that contains the new parameters. Set the cbSize member of this structure and the uiParam parameter to sizeof(MINIMIZEDMETRICS).

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 tosizeof(NONCLIENTMETRICS). Also, the lfHeight member of the LOGFONT structure must be a negative value.

SPI_SETSHOWIMEUI

Sets whether the IME status window is visible or not on a per-user basis. The uiParam parameter specifies TRUE for on or FALSE for off.

Windows Me/98/95: The following parameters are specific to this platform.
ParameterMeaning

SPI_GETWINDOWSEXTENSION

Windows 95: Determines whether the Windows extension, Windows Plus!, is installed. Set the uiParamparameter to 1. The pvParam parameter is not used. The function returns TRUE if the extension is installed, or FALSE if it is not.

SPI_SETPENWINDOWS

Windows Me/98/95: Pen windows is being loaded or unloaded. The uiParam parameter is TRUE when loading and FALSE when unloading pen windows. ThepvParam parameter is NULL.

SPI_SETSCREENSAVERRUNNING

Windows Me/98: Used internally; applications should not use this flag.
uiParam

A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide parameters, see the uiAction parameter. If not otherwise indicated, you must specify zero for this parameter.

pvParam

A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide parameters, see the uiAction parameter. If not otherwise indicated, you must specify NULL for this parameter.

fWinIni

If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change.

This parameter can be zero if you don't want to update the user profile or broadcast the WM_SETTINGCHANGE message, or it can be one or more of the following values.

ValueMeaning

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.

Return Value

If the function succeeds, the return value is a nonzero value.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This function is intended for use with applications that allow the user to customize the 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.

There is a difference between the High Contrast color scheme and the High Contrast Mode. The High Contrast color scheme changes the system colors to colors that have obvious contrast; you switch to this color scheme by using the Display Options in the control panel. The High Contrast Mode, which uses SPI_GETHIGHCONTRAST and SPI_SETHIGHCONTRAST, advises applications to modify their appearance for visually-impaired users. It involves such things as audible warning to users and customized color scheme (using the Accessibility Options in the control panel). For more information, see HIGHCONTRAST. For more information on general accessibility features, see Accessibility.

During the time that the primary button is held down to activate the Mouse ClickLock feature, the user can move the mouse. Once the primary button is locked down, releasing the primary button does not result in a WM_LBUTTONUP message. Thus, it will appear to an application that the primary button is still down. Any subsequent button message releases the primary button, sending a WM_LBUTTONUP message to the application, thus the button can be unlocked programmatically or through the user clicking any button.

Example Code

For an example, see Getting Hardware Information.

Requirements

Client

Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.

Server

Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server.

Header

Declared in Winuser.h; include Windows.h.

Library

Use User32.lib.

DLL

Requires User32.dll.

Unicode

Implemented as SystemParametersInfoW (Unicode) and SystemParametersInfoA(ANSI).

See Also

ACCESSTIMEOUT
ANIMATIONINFO
AUDIODESCRIPTION
FILTERKEYS
HIGHCONTRAST
ICONMETRICS
LOGFONT
MAKELANGID
MINIMIZEDMETRICS
MOUSEKEYS
NONCLIENTMETRICS
RECT
SERIALKEYS
SOUNDSENTRY
STICKYKEYS
TOGGLEKEYS
WM_SETTINGCHANGE

'NativeCode > mfc' 카테고리의 다른 글

Static Control 일반적 내용  (0) 2010.03.18
Static Control Font 설정  (0) 2010.03.18
Timer Callback  (0) 2010.03.18
Tray(소스 有)  (0) 2010.03.18
Tray Icon Refresh  (0) 2010.03.18

+ Recent posts