Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

OS - Win7 pro x64, using VS2010 c++.

I'll looking for a way to pro grammatically change the default window sounds from my c++ application. Before anyone says it... I know, I know... Normally you wouldn't want to do this as it would upset the other users of the machine etc, however this application is for a very specific use and the pc will not be used in a regular 'multi-user' way. There will only ever be one user and they have to use the single application that I'm developing.

Ok, where was I... I'd prefer to use the Windows API if possible, but I can't see where I'm supposed to begin, or even if there are API functions to do this?

Any help in the right direction would be great.

Thanks
Dave
Posted
Comments
LaxmikantYadav 13-Nov-14 1:39am    
http://winmm.codeplex.com might help you.

Short answer is to change the registry.

Here's an article on the subject.

Play Windows sound events defined in system Control Panel[^]


From the article:

XML
Every sound event is based on :

    .default Wave file defined by the vendor of the application.
    .current Wave file currently used for this sound event.
    HKEY_CURRENT_USER\AppEvents\EventLabels\<EVENTNAME> Description used to display sound event.

With this knowledge, we can rebuild the control panel view of the system sounds. We're also able to add our own sound events to registry. All we have to do is create some registry keys at the right position.
 
Share this answer
 
Many thanks,

I'll look into the approach.

Dave
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900