读书人

请问!怎么让程序发出报警声音~高手支招

发布时间: 2012-01-31 21:28:41 作者: rapoo

请教!如何让程序发出报警声音~~高手支招~~
我想让程序发出 滴滴滴滴 的报警声音, 不知咋搞!麻烦各路大侠详细说明一下!!

谢谢!!^_^

[解决办法]
Beep
MessageBeep

[解决办法]
或者可以自己播放一个WAV声音
sndPlaySound
[解决办法]
MessageBeep
The MessageBeep function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.

BOOL MessageBeep(
UINT uType // sound type
);
Parameters
uType
[in] Specifies the sound type, as identified by an entry in the registry. This parameter can be one of the following values. Value Sound
-1 Standard beep using the computer speaker
MB_ICONASTERISK SystemAsterisk
MB_ICONEXCLAMATION SystemExclamation
MB_ICONHAND SystemHand
MB_ICONQUESTION SystemQuestion
MB_OK SystemDefault

[解决办法]
可以自己录个报警铃声如 ".wav "格式。然后调用PlaySound即可。

读书人网 >VC/MFC

热点推荐