Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The show sounds option indicates whether the user wants applications to present all important information in visual form, rather than presenting some important information only in audible form.

The user controls the setting of the show sounds option by using the AccessibilityControl Panel application or another application for customizing the environment. Applications use the SPI_GETSHOWSOUNDS and SPI_SETSHOWSOUNDS flags with the SystemParametersInfofunction to retrieve and set the status of the show sounds option. To retrieve the status of the show sounds option, call SystemParametersInfowith the uiActionparameter set to SPI_GETSHOWSOUNDS and the pvParamparameter set to a pointer to a parameter of type BOOLthat receives TRUE if the show sounds option is on or FALSE if the show sounds option is off.

The following code example shows how to retrieve the status of the show sounds option.

Copy Code
BOOL bSuccess, bShowSounds;
BOOL *pbShowSounds = &bShowSounds;

// Call SystemParametersInfo with the SPI_GETSHOWSOUNDS flag. 

bSuccess = SystemParametersInfo(SPI_GETSHOWSOUNDS, 0, 
								(LPVOID) pbShowSounds, 0);

if(*pbShowSounds == TRUE) {
// Add code here to present important information visually.
}

else {
// Add code here that does not always present important information
// visually.
}

To set the status of the show sounds option, call SystemParametersInfowith the uiActionparameter set to SPI_SETSHOWSOUNDS and the pvParamparameter set to TRUE if you want to turn the show sounds option on or set pvParamto FALSE if you want to turn the show sounds option off.

Only applications that typically present important information by sound alone need to determine whether the user has turned on or off the show sounds option. An application should use the show sounds option if the application uses sounds to perform either of the following actions:

  • Convey information that is important to the operation of the application.

  • Alert the user when the application presents important information visually. Even though the information is presented visually, the sound has the additional function of attracting the attention of the user. When the user turns on the show sounds option, the application should use visual means to attract the attention of the user.

Appropriate visual feedback can make the application much more functional for users who cannot rely on sound alone. The design of the visual feedback is application-specific and depends on the information that the application presents to the user. For example, to attract the attention of the user when new electronic mail arrives, the application might flash its window or even flash the entire screen. If the application typically makes sound to indicate that the user is trying to perform an illegal operation, the application could also display an appropriate message on the status line for the window or use the MessageBoxfunction to display a specific error message. An application that plays sounds that carry meaning, such as digitized speech, could also display a caption window with the same text.

Redundant use of audible and visual alerts increases the usability of software applications. The show sounds option represents a request for visual feedback, but use of this option does not restrict an application to presenting information visually. Users should be able to request visual feedback regardless of whether they also want audible feedback.

See Also