MessageBeep Function
来源:互联网 发布:绿标网址域名防红跳转 编辑:程序博客网 时间:2024/06/14 17:13
MessageBeep Function
Plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.
BOOL WINAPI MessageBeep( __in UINT uType);
Parameters
- uType
The sound type, as identified by an entry in the registry. This parameter can be one of the following values.
Value Meaning -1
Simple beep. If the sound card is not available, the sound is generated using the speaker.
Note that this value is resolved to 0xFFFFFFFF within the function.
MB_ICONASTERISK
0x00000040LSystemAsterisk
MB_ICONEXCLAMATION
0x00000030LSystemExclamation
MB_ICONHAND
0x00000010LSystemHand
MB_ICONQUESTION
0x00000020LSystemQuestion
MB_OK
0x00000000LSystemDefault
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call 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.
Terminal Services: To send a beep to a client, use the Beep function. The Beep function is redirected to the client, whereas MessageBeep is not, except on Windows NT 4.0 where MessageBeep(-1) calls Beep.
Example Code
For an example, see Notifying the User of Errors.
Requirements
Client
Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.
Server
Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server.
Header
Declared in Winuser.h; include Windows.h.
Library
Use User32.lib.
DLL
Requires User32.dll.
See Also
Beep
Error Handling Functions
FlashWindow
Notifying the User
Send comments about this topic to Microsoft
Build date: 8/10/2007
- MessageBeep Function
- MessageBeep函数
- 奇怪的messagebeep()
- WinAPI: MessageBeep 用法
- MessageBeep(0) 发声
- MessageBeep sndPlaySound PlaySound 音频播放
- 关于 Beep、MessageBeep 和 Windows.Beep
- 实验: MessageBeep和Beep的区别
- 关于 Beep、MessageBeep 和 Windows.Beep
- C#调用声音函数(PlaySound,Beep,MessageBeep等)
- C#调用声音函数(PlaySound,Beep,MessageBeep等)
- delphi报警声音 Beep、MessageBeep 和 Windows.Beep
- delphi报警声音 Beep、MessageBeep 和 Windows.Beep
- Function
- function
- function
- function $()
- Function
- VML极道教程(九) background背景
- VML极道教程(十一) 2级标记stroke边框,shadow阴影
- JAVA 输出 中文 星期
- VML极道教程(十二) VML编程大结局
- RegisterWindowMessage Function
- MessageBeep Function
- CSharp Tips:调用Win32 API如何处理指针类型的参数(补)
- .Net中的文件监视功能实现
- 事件处理类
- ubuntu默认root密码
- ::DialogBoxParam (hInstance, MAKEINTRESOURCE (IDD_WININFO), NULL, MainDlgProc, NULL);
- 解决Linux iptables防火墙和vsftpd的问题
- winform 程序的配置文件——App.config
- c语言 宏