BOOL MessageBeep(uType) | |||||
UINT uType; | /* sound type | */ |
The MessageBeep function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the [sounds] section of the WIN.INI initialization file.
uType
Specifies the sound type. This parameter can be one of the following values:
Value | Meaning |
-1 | ||
Produces a standard beep sound by using the computer speaker. | ||
MB_ICONASTERISK | ||
Plays the sound identified by the SystemAsterisk entry in the [sounds] section of WIN.INI. | ||
MB_ICONEXCLAMATION | ||
Plays the sound identified by the SystemExclamation entry in the [sounds] section of WIN.INI. | ||
MB_ICONHAND | ||
Plays the sound identified by the SystemHand entry in the [sounds] section of WIN.INI. | ||
MB_ICONQUESTION | ||
Plays the sound identified by the SystemQuestion entry in the [sounds] section of WIN.INI. | ||
MB_OK | ||
Plays the sound identified by the SystemDefault entry in the [sounds] section of WIN.INI. |
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
MessageBeep returns control to the caller after queuing the sound 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 by using the computer speaker.
The user can disable the warning beep by using the Windows Control Panel application Sounds.
FlashWindow, MessageBox