Solved

Adding to the Windows sound Events

Posted on 2000-04-04
2
133 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
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

829 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