如何发挥一个标准的Windows声音? [英] How to play a standard windows sound?
问题描述
我如何找出声音文件的用户在控制面板配置?
例如:我想播放声音的连接设备
哪些API可用于查询的控制面板声音设置?
我看到有通过在控制面板对话框第三方程序做了一些自定义项,所以必须有这些计划与全球声音设置交流的方式。
编辑:谢谢。我不知道指定注册表项的名称时,PlaySound也只是起到相应的声音文件。
要玩设备Conntected的声音:
:: PlaySound(TEXT(DeviceConnect),NULL,SND_ALIAS | SND_ASYNC);
How do I find out which sound files the user has configured in the control panel?
Example: I want to play the sound for "Device connected".
Which API can be used to query the control panel sound settings?
I see that there are some custom entries made by third party programs in the control panel dialog, so there has to be a way for these programs to communicate with the global sound settings.
Edit: Thank you. I did not know that PlaySound also just played appropriate sound file when specifying the name of the registry entry.
To play the "Device Conntected" sound:
::PlaySound( TEXT("DeviceConnect"), NULL, SND_ALIAS|SND_ASYNC );
PlaySound is the API ,also see Play System Sounds
这篇关于如何发挥一个标准的Windows声音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!