Solved

Adding to the Windows sound Events

Posted on 2000-04-04
2
136 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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