This message is sent by the OS to all top-level windows after a system-wide change has been made. The WM_SETTINGCHANGE message is the same as the older WM_WININICHANGE message.
At a Glance
Header file: | Winuser.h |
Windows CE versions: | 1.0 and later |
Syntax
WM_SETTINGCHANGE wParam = wFlag; lParam = (LPARAM)(LPCTSTR) pszSection;
Parameters
wFlag
When the system sends the message as a result of a SystemParametersInfo call, this parameter is a flag that indicates the system parameter that was changed. For a list of values, see the SystemParametersInfo function.
When an application sends the message, this parameter must be NULL.
pszMetrics
Pointer to a null-terminated string that indicates the area that contains the system parameter that was changed. For example, this string can be the name of a registry key or the name of a section in the Win.ini file.
This parameter is not particularly useful in determining which system parameter changed. For example, when the string is a registry name, it typically indicates only the leaf node in the registry, not the whole path. In addition, some applications send this message with lParam set to NULL. In general, when you receive this message, you should check and reload any system parameter settings used by your application.
Return Values
An application should return zero if it processes this message.
Remarks
The wParam parameter is set to NULL.
The lParam parameter is a constant, defined in Winuser.h, rather than a pointer to a string. For Windows CE versions 2.10 and later, lParam is not used.
At this time, the only value defined for lParam is INI_INTL, which indicates that a user has made a change to the regional settings in the control panel. This message is sent to all running applications. An application does not need to send this message.
On a Palm-size PC and for Windows CE versions 2.10 and later, WM_SETTINGCHANGE is sent to all top-level windows when changes are made to the following input panel elements:
A change in the input panel information sets wFlags to SPI_SETSIPINFO, whereas a change in the current IM sets the flag to SPI_SETCURRENTIM.. An application can change the input panel size in response to this message. However, for performance reasons, inactivated applications—for example, applications not currently in the foreground—should cache any input panel changes and delay updating the window until the application is reactivated. When notified of the change in the input panel state, an activated application may want to query the current input panel state before making the final adjustment. Do so by calling the SHSipInfo function on a Palm-size PC and SipGetInfo for other Windows CE–based devices.
On the Palm-size PC, when the user changes the application button mappings, a WM_SETTINGCHANGE message is broadcast to all top-level windows with wParam being set to SPI_APPBUTTONCHANGE and lParam to zero.
Calls to functions that change the WIN.INI file might be mapped to the registry instead. This mapping occurs when the WIN.INI file and the section being changed are specified in the registry under the following keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\
Windows NT\CurrentVersion\IniFileMapping
The change in the storage location has no effect on the behavior of this message.
See Also