Solved

Adding to the Windows sound Events

Posted on 2000-04-04
2
134 Views
Last Modified: 2010-05-02
I am writing a program that plays wav files when certain events occur. I would like to add these events to the windows Sound events list so that wav files can be specified from the control panel.

How do you add to the Control Panel/Sound events list and then read back the wav file attached to a particular event?   -Thanks

Regards
GavinS
0
Comment
Question by:GavinS
[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 3

Accepted Solution

by:
wpsjr1 earned 100 total points
ID: 2686266
You need to use the Registry API:

RegOpenKeyEx, RegQueryValueEx, RegCreateKeyEx, RegSetValueEx and RegCloseKey

The event names are subkeys of:

\HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default <- windows sounds

If you wanted to add an event for your app it would be:
\HKEY_CURRENT_USER\AppEvents\Schemes\Apps\MyApp\MyEvent


Take a look with regedit, I'm sure you'll get the idea.

Enjoy!  :)

Paul
0
 

Author Comment

by:GavinS
ID: 2686362
Thanks wpsjr1,
I had a look in the registry and I've got the general idea on how everything is organised.   I have't used the Registry API's before, but think I should be able to work it out from here.
Thanks again,

Regards
GavinS
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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