Article ID: 198248 - View products that this article applies to.
This article was previously published under Q198248
This article has been archived. It is offered "as is" and will no longer be updated.
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.
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:
(http://support.microsoft.com/kb/152734/EN-US/ )How to Obtain the Latest Windows NT 4.0 Service Pack
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.
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.
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:
(http://support.microsoft.com/kb/93362/EN-US/ )C2 Evaluation and Certification for Windows NT