Jaa


Receiving a Policy Refresh Message

The following code example shows how to enable an application to be aware of policy refreshes by monitoring the WM_SETTINGCHANGE window message with the lParam parameter set to "Policy".

  case WM_SETTINGCHANGE:

       if (!lstrcmpi ((LPTSTR)lParam, TEXT("Policy"))) {

            if (wParam) {
                AddString (TEXT("Received WM_WININICHANGE:  machine policy applied."));
            } else {
                AddString (TEXT("Received WM_WININICHANGE:  user policy applied."));
            }
       }
       break;