INFO: How Clients Should Use SPI_SETSCREENREADER

Last reviewed: March 3, 1998
Article ID: Q180958
The information in this article applies to:

- Microsoft Win32 Software Development Kit (SDK) on the following

  platforms:
   - Microsoft Windows NT
   - Microsoft Windows 95

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:

  • IE expands the bounding rectangle of graphic objects to allow the entire contents of the graphic objects' ALT text tags to be displayed. This allows screen readers to obtain the contents of an ALT text tag, regardless of the dimensions of the graphic it describes.
  • Word sends notifications of focus changes so that screen readers can keep the user informed of their current state and location.

REFERENCES

Microsoft Active Accessibility SDK


Additional query words: SPIF_SENDCHANGE SPI_SCREENREADER MSAA
Keywords : BseRegistry
Version : WIN95;WINNT:4.0;
Platform : Win95 winnt
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.