?
Solved

Adding to the Windows sound Events

Posted on 2000-04-04
2
Medium Priority
?
141 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 300 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

Independent Software Vendors: 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 While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

770 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