void MessageBeep(uAlert) | ||||
UINT uAlert; | /* alert level, */ |
The MessageBeep function plays a waveform sound corresponding to a given system alert level. The sound for each alert level is identified by an entry in the [sounds] section of the WIN.INI initialization file.
uAlert
Specifies the alert level. 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. |
This function does not return a value.
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.