MessageBeep

更新时间:2023-10-19 11:20

MessageBeep函数用来播放一个波形声音。

定义

MessageBeep函数用来播放一个波形声音。

This function plays a waveform sound. (该函数是播放一段系统音乐)

BOOL MessageBeep(UINT uType //根据不同的类型来定);

Parameters(参数)

uType

Specifies the sound type, as identified by an entry in the [sounds] section of the registry. It is one of the following values.

Value Description (数值描述):

0xFFFFFFFF SystemDefault (从机器的扬声器中发出蜂鸣声)

MB_ICONASTERISK SystemAsterisk (播放由SystemAsterisk定义的声音)

MB_ICONEXCLAMATION SystemExclamation (播放由SystemExclamation定义的声音)

MB_ICONHAND SystemHand (播放由SystemHand定义的声音)

MB_ICONQUESTION SystemQuestion (播放由SystemQuestion定义的声音)

MB_OK SystemDefault (播放由SystemDefault定义的声音)

Return Values(返回值):

1.Nonzero indicates success. (非零表示成功)

2.Zero indicates failure. (零表示不成功)

3.To get extended error information, call GetLastError.(通过GetLastError函数来获取错误信息)

Remarks(说明):

After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously.

If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker.

The user can disable the warning beep by using the Sound Control Panel application.

Requirements

OS Versions: Windows CE 1.0 and later.

Header: Winbase.h.

Link Library: Msgbeep.lib.

See Also

MessageBox

程序示例

免责声明
隐私政策
用户协议
目录 22
0{{catalogNumber[index]}}. {{item.title}}
{{item.title}}