Enabling Show Sounds

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 Accessibility Control Panel application or another application for customizing the environment. Applications use the SPI_GETSHOWSOUNDS and SPI_SETSHOWSOUNDS flags with the SystemParametersInfo function to retrieve and set the status of the show sounds option. To retrieve the status of the show sounds option, call SystemParametersInfo with the uiAction parameter set to SPI_GETSHOWSOUNDS and the pvParam parameter set to a pointer to a parameter of type BOOL that 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.

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 SystemParametersInfo with the uiAction parameter set to SPI_SETSHOWSOUNDS and the uiParam parameter set to TRUE if you want to turn the show sounds option on or set uiParam to 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 MessageBox function 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

Accessibility | Enabling Sound Sentry

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.