Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Adding sounds to the sound control panel

Posted on 2000-02-23
2
Medium Priority
?
177 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 31

Accepted Solution

by:
Zoppo earned 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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