Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Adding sounds to the sound control panel

Posted on 2000-02-23
2
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

705 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