Microsoft KB Archive/198248

= Some SPI_SET Settings Are Treated As Read-Only Attributes =

Article ID: 198248

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows NT Server 4.0, Terminal Server Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition

-



This article was previously published under Q198248



SYMPTOMS
You can call the SystemParametersInfo API to set and get all the settings controlled by the Windows Control Panel. Normally a user would have to select the Windows Control Panel to view or change system settings such as granularity, wallpaper, or icon title wrap. Instead of forcing the user to set things manually using Control Panel, you can have your program call the SystemParametersInfo API to set them automatically.

The SystemParametersInfo function queries or sets system-wide parameters. These API functions can also update the user profile while setting a parameter (SPI_SET). Your custom application may have problems defining system settings because certain functions are treated as read-only in the SystemParametersInfo, thus limiting the ability to define a system's settings. These functions are: SPI_SETDRAGFULLWINDOWS, SPI_SETDRAGWIDTH, SPI_SETDRAGHEIGHT, SPI_SETCURSORS, SPI _SETICONS, and SPI_SETLANGTOGGLE.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

152734 How to Obtain the Latest Windows NT 4.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.



MORE INFORMATION
SPI_SETDRAGFULLWINDOWS: Sets dragging of full windows either on or off. The uiParam parameter specifies TRUE for on or FALSE for off.

SPI_SETDRAGWIDTH: Sets the width, in pixels, of the rectangle used to detect the start of a drag operation.

SPI_SETDRAGHEIGHT: Sets the height, in pixels, of the rectangle used to detect the start of a drag operation.

SPI_SETCURSORS: Reloads the system cursors. Set the uiParam parameter to zero and the pvParam parameter to NULL.

SPI _SETICONS: Reloads the system icons. Set the uiParam parameter to zero and the pvParam parameter to NULL.

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.

Syntax
  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);

For additional information on these and other API functions, please refer to MSDN.

For additional information on the C2 Evaluation and Certification process, please see the following article in the Microsoft Knowledge Base:

93362 C2 Evaluation and Certification for Windows NT

Keywords: kbbug kbfix KB198248

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.