Solved

Adding sounds to the sound control panel

Posted on 2000-02-23
2
169 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 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
List out all word 7 293
difference between String.subString() and String.subSequence() 6 200
Modbus - whats the maximum I can store in one register? 4 80
Making an alias 7 95
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

810 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