Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MessageBeep (Compact 2013)

3/28/2014

This function plays a waveform sound.


BOOL MessageBeep(
  UINT uType
);

uType

[in] 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

MB_ICONEXCLAMATION

SystemExclamation

MB_ICONHAND

SystemHand

MB_ICONQUESTION

SystemQuestion

MB_OK

SystemDefault

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

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.

Header

winbase.h

Library

Msgbeep.lib

Show:
© 2015 Microsoft