windows_programming_notes.nbk: Home | Index | Next Page: MessageBox | Previous Page: message-only window


 MessageBeep

Plays a waveform sound. The waveform sound for each sound type is identified by an entry in the registry.

Syntax

    BOOL WINAPI MessageBeep(
      __in  UINT uType
    );

Parameters

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.

Requirements

Library Use User32.lib.

DLL Requires User32.dll.


windows_programming_notes.nbk: Home | Index | Next Page: MessageBox | Previous Page: message-only window


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time