Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PlaySound() problem.

Status
Not open for further replies.

bennison

Programmer
Joined
Jun 20, 2000
Messages
1
Location
SE
<br>Hello!<br><br>I have a problem with the PlaySound() function in MS VC++.&nbsp;&nbsp;I want to play an application event:<br><br>PlaySound(&quot;MyInfo&quot;, NULL, SND_APPLICATION ¦ SND_ALIAS ¦ SND_ASYNC);<br><br>In the registry, the follow keys are added:<br><br>HKCU\AppEvents\EventLabels\MyInfo<br>HKCU\Schemes\Apps\MyAPP\MyInfo<br>HKCU\Schemes\Apps\MyAPP\MyInfo\.current = &quot;chimes.wav&quot;<br><br>This way, I can go into Sounds in the Control Panel and choose which sound to associate with my app event.&nbsp;&nbsp;But it doesn't seem to find the correct alias, so it always plays the SystemDefault event.&nbsp;&nbsp;If I add SND_NODEFAULT to the PlaySound command, it doesn't play anything at all.<br><br>Has anyone encountered this or knows how to deal with it?<br><br>Thankyou!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top