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 0x00000040L SystemAsterisk
MB_ICONEXCLAMATION 0x00000030L SystemExclamation
MB_ICONHAND 0x00000010L SystemHand
MB_ICONQUESTION 0x00000020L SystemQuestion
MB_OK 0x00000000L SystemDefault 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.
__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
0x00000040L
SystemAsterisk
MB_ICONEXCLAMATION
0x00000030L
SystemExclamation
MB_ICONHAND
0x00000010L
SystemHand
MB_ICONQUESTION
0x00000020L
SystemQuestion
MB_OK
0x00000000L
SystemDefault
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.
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);参数pszSound是指定了要播放声音的字符串,该参数可以是在系统注册表WIN.INI中定义的系统事件声音。如果该参数为NULL则停止正在播放的声音。
参数hmod是应用程序的实例句柄,除非pszSound的指向一个资源标识符(即fdwSound被定义为SND_RESOURCE),否则必须设置为NULL。
参数fdwSound是标志的组合,如下表所示。若成功则函数返回TRUE,否则返回FALSE。
SND_ALIAS
pszSound参数指定了注册表或WIN.INI中的系统事件的别名。