Article ID: 180958 - View products that this article applies to.
This article was previously published under Q180958
Screen readers set the system-wide SPI_SETSCREENREADER flag when they initialize and clear the flag when they terminate. Although Microsoft does not recommend that you use this method to manage changing behavior, accessibility-aware applications such as Microsoft Internet Explorer also use the flag to control how the application interacts with the system.
Because the SPI_SETSCREENREADER flag affects the behavior of these (and other) applications, you must modify the flag carefully. Additionally, the flag must always be followed by a WM_SETTINGCHANGE message. The WM_SETTINGCHANGE message makes sure that any active applications are given the opportunity to modify behavior based upon the flag's new value.
Recommendation for ClientsWhen you modify the SPI_SETSCREENREADER flag with a call to SystemParametersInfo, you must specify SPIF_SENDCHANGE in the last parameter to broadcast a WM_SETTINGCHANGE message. By sending the WM_SETTINGCHANGE message, you make sure 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, make sure that you handle the WM_SETTINGCHANGE message. If your application receives this message, it should take the appropriate action to preserve its appropriate operation.
For example, assume two different applications handle the SPI_SCREENREADER flag as follows (without sending or handling the WM_SETTINGCHANGE message):
To avoid this problem, an application that handles the SPI_SCREENREADER flag should always use SPIF_SENDCHANGE to make sure that other applications are notified of the change. Additionally, an application that is dependent on this flag for appropriate operation should handle the WM_SETTINGCHANGE message and react accordingly.
Recommendation for ServersApplications should be programmatically accessible regardless of the SPI_GETSCREENREADER flag results. The system-wide flag can be used only when a screen reader-specific solution conflicts with other features or adds redundant information. The flag should not be used to completely change the user interface.
SPI_SETSCREENREADER is set while the screen reader is running on the system. Applications should respect WM_SETTINGCHANGE to track the SPI_GETSCREENREADER flag change. The changed effect should not affect your user interface globally across multi-user sessions.
For example, in the Internet Options dialog box, on the Advanced tab, Microsoft Internet Explorer adds the check box selection status (selected or cleared) followed by the check box item only when the SPI_GETSCREENREADER flag returns TRUE. The status of the check box is available through the State property of the Microsoft Active Accessibility object, but the additional label helps screen readers that do not yet support this property.
As another example, GDI+ had issues with screen magnification tools or screen readers that were resolved without introducing a scenario that relies on the SPI_GETSCREENREADER flag. For additional information about GDI+, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/319261/EN-US/ )Graphics That Are Rendered by GDI+ Cannot Be Magnified by Screen Magnifiers
Contact us for more help
Connect with Answer Desk for expert help.