Solved

Adding sounds to the sound control panel

Posted on 2000-02-23
2
167 Views
Last Modified: 2013-11-20
How can I add sounds to the sound control panel (mmsys.cpl) so that my application can be included in the list? Is there some API function I can use? I've tried using the registry keys to add sounds, but that won't be very useful in Win2000/NT, only in Win98.
0
Comment
Question by:cyberbum
2 Comments
 
LVL 30

Accepted Solution

by:
Zoppo earned 100 total points
ID: 2550984
Hi Cyberbum,

I don't believe there's an API for this   :(

>but that won't be very useful in Win2000/NT, only in Win98
WHY???

I think that's the way it must be done, there's an MSDN article 'Integration with the shell' which describes 'Registering Sound Events':

------------------------------------------------------------------------------
Registering Sound Events:
Your application can register specific events to which the user can assign sound files. When those events are triggered, the assigned sound file is played. To register a sound event, create a key under the HKEY_CURRENT_USER key, as follows:
HKEY_CURRENT_USER
AppEvents
Event Labels
EventName = Event Name
Set the value for EventName to a name that users can read. This is what will appear in Control Panel.
Registering a sound event makes it available in Control Panel so that users can assign a sound file to it. Your application must provide the code to trigger that event when appropriate.
Defining as many sound events as possible for your application can be especially helpful for users who need additional feedback — for example, users with visual and some types of cognitive impairments. This does not mean that your application must generate sounds for all events. You can simply not assign sounds to an event by default. This way, users who want additional feedback can use Control Panel to add appropriate sounds.
Always specify sounds to be played by using registry entries. Avoid specifying sounds by file name or resource, because these cannot be customized through Control Panel, and because accessibility aids cannot determine the meaning of these sounds.
In addition, always trigger standard sound events when carrying out equivalent actions. For example, if you display the equivalent of a critical message box, play the SND_ALIAS_SYSTEMEXCLAMATION event sound.
More Information
For more information about system sound events, see the Microsoft Platform SDK on the MSDN Online Web site at http://msdn.microsoft.com/ui/guide/sdk.asp.
------------------------------------------------------------------------------

ZOPPO
0
 
LVL 1

Author Comment

by:cyberbum
ID: 2551078
Thanks dude! I was adding the keys to HKEY_USERS, not HKEY_CURRENTUSER...it works like a charm!:)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now