Some SPI_SET Settings Are Treated As Read-Only Attributes

This article was previously published under Q198248
This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
You can call the SystemParametersInfo API to set and get all the settingscontrolled by the Windows Control Panel. Normally a user would have toselect the Windows Control Panel to view or change system settings such asgranularity, wallpaper, or icon title wrap. Instead of forcing the user toset things manually using Control Panel, you can have your program call theSystemParametersInfo 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 aparameter (SPI_SET). Your custom application may have problems definingsystem settings because certain functions are treated as read-only in theSystemParametersInfo, thus limiting the ability to define a system'ssettings. 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 theMicrosoft 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. TheuiParam parameter specifies TRUE for on or FALSE for off.

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

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

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

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

SPI_SETLANGTOGGLE: Sets the hot key set for switching between inputlanguages. The uiParam and pvParam parameters are not used. The value setsthe shortcut keys in the keyboard property sheets by reading the registryagain. The registry must be set before this flag is used. the path in theregistry 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 referto MSDN.

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

93362C2 Evaluation and Certification for Windows NT
Properties

Article ID: 198248 - Last Review: 10/26/2013 03:15:00 - Revision: 3.0

  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • kbnosurvey kbarchive kbbug kbfix KB198248
Feedback