INFO: How Clients Should Use SPI_SETSCREENREADER

ID: Q180958

The information in this article applies to:

SUMMARY

Screen readers set the system-wide SPI_SETSCREENREADER flag when they initialize and clear it when they terminate. This flag is used by Accessibility-aware applications such as Internet Explorer (IE) and Word to control how the application interacts with the system.

Because the SPI_SETSCREENREADER flag alters the behavior of these (and other) applications, it must be modified carefully and must always be followed by a WM_SETTINGCHANGE message. The WM_SETTINGCHANGE message ensures that any active applications are given the opportunity to modify behavior based upon the flag's new value.

MORE INFORMATION

When you modify the SPI_SETSCREENREADER flag with a call to SystemParametersInfo, you need to specify SPIF_SENDCHANGE in the last parameter to broadcast a WM_SETTINGCHANGE message. Sending the WM_SETTINGCHANGE message ensures that all active applications are notified that the SPI_SETSCREENREADER flag has been set.

Similarly, when you write an application that depends on the value of the SPI_SETSCREENREADER flag, be sure to handle the WM_SETTINGCHANGE message. If your application receives this message, it should take the appropriate action to preserve its proper operation.

For example, assume two different applications manipulate the SPI_SCREENREADER flag as follows (without sending or handling the WM_SETTINGCHANGE message):

    *  Set SPI_SCREENREADER to TRUE when initializing.
    *  Set SPI_SCREENREADER to FALSE when terminating.

If both applications begin executing, each application will set the flag to TRUE. Then, when one of these applications terminates, the other application will continue to execute under the incorrect assumption that the SPI_SCREENREADER flag is still set.

To avoid this problem, an application that manipulates the SPI_SCREENREADER flag should always use SPIF_SENDCHANGE to ensure other applications are notified of the change. Furthermore, an application that is dependent on this flag for proper operation should handle the WM_SETTINGCHANGE message and react accordingly.

The following list contains two example of the type of runtime adjustments that are made (by IE and Word) in response to changes in this system-wide flag.

When the SPI_SETSCREENREADER flag is set:

REFERENCES

Microsoft Active Accessibility SDK

Additional query words: SPIF_SENDCHANGE SPI_SCREENREADER MSAA

Keywords          : kbAAcc kbKernBase kbRegistry 
Issue type        : kbinfo

Last Reviewed: December 15, 1998