windows_programming_notes.nbk: Home | Index | Next Page: win32 msgs: WM_TIMECHANGE | Previous Page: win32 msgs: WM_SETREDRAW


 win32 msgs: WM_SETTINGCHANGE

A message that is sent to all top-level windows when the SystemParametersInfo function changes a system-wide setting or when policy settings have changed.

Applications should send WM_SETTINGCHANGE to all top-level windows when they make changes to system parameters. (This message cannot be sent directly to a window.) To send the WM_SETTINGCHANGE message to all top-level windows, use the SendMessageTimeout function with the hwnd parameter set to HWND_BROADCAST.

A window receives this message through its WindowProc function.

    LRESULT CALLBACK WindowProc(
      HWND hwnd,       // handle to window
      UINT uMsg,       // message identifier
      WPARAM wParam,   // system parameter indicator
      LPARAM lParam    // system parameter area (LPCTSTR)
    );

Parameters

When the system sends this message as a result of a change in policy settings, this parameter indicates the type of policy that was applied. This value is 1 if computer policy was applied or zero if user policy was applied.

When the system sends this message as a result of a change in locale settings, this parameter is zero.

When an application sends this message, this parameter must be NULL.

This string can be the name of a registry key or the name of a section in the Win.ini file. When the string is a registry name, it typically indicates only the leaf node in the registry, not the full path.

When the system sends this message as a result of a change in policy settings, this parameter points to the string "Policy".

When the system sends this message as a result of a change in locale settings, this parameter points to the string "intl".

To effect a change in the environment variables for the system or the user, broadcast this message with lParam set to the string "Environment".

Return Value

If you process this message, return zero.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: win32 msgs: WM_TIMECHANGE | Previous Page: win32 msgs: WM_SETREDRAW


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time