Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Beeping in MFC?

187 views
Skip to first unread message

Vinny

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to

I want to use the PC Speaker to creat Beep noise. I tried
using Beep(Hertz, ms) but int wasn't working.

I think it tries to play from the soundcard if you have windows95 or winnt
installed. Does anyone know how to create a Beep sound with the PC
speaker win95/NT with VC++5.0?

-Vinod


PO

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to
hi,

i typically use MessageBeep(MSICON_EXCLAMATION) without any problems.
there are several 'beep types' available, and I don't know about how to
use this function to create your own sound like Beep did with hertz.

regards
Pat

sh

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to

try MessageBeep(1);

shui...@freemail.nl

Vinny <tet...@grove.ufl.edu> wrote in article
<6fh28j$h...@no-names.nerdc.ufl.edu>...

Frank Pijpers

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to

On 27 Mar 1998 20:30:11 GMT, tet...@grove.ufl.edu (Vinny) wrote:

>I want to use the PC Speaker to creat Beep noise. I tried
>using Beep(Hertz, ms) but int wasn't working.

The Win32 SDK documentation states (included with VC++ 5.0):

The Beep function generates simple tones on the speaker. The function
is synchronous; it does not return control to its caller until the
sound finishes.

BOOL Beep(
DWORD dwFreq, // sound frequency, in hertz
DWORD dwDuration // sound duration, in milliseconds
);

dwFreq

Windows NT:
Specifies the frequency, in hertz, of the sound. This parameter must
be in the range 37 through 32,767 (0x25 through 0x7FFF).

Windows 95:
The parameter is ignored.

dwDuration

Windows NT:
Specifies the duration, in milliseconds, of the sound.

Windows 95:
The parameter is ignored.

Return Values
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
Windows 95:
The Beep function ignores the dwFreq and dwDuration parameters. On
computers with a sound card, the function plays the default sound
event. On computers without a sound card, the function plays the
standard system beep.


Frank
---------------------------------------------------------------------
PHILIPS Medical Systems Nederland B.V. Radel B.V.
Department XCB-CIS, room QA-III 426 Impressive in Innovation
P.O. Box 10000 Batalaan 10
5680 DA Best 5684 ZL Best
The Netherlands The Netherlands

mailto:fpij...@best.ms.philips.com mailto:frank....@radel.nl
talkto:+31-(0)40-2764195 talkto: +31 (0)499 397919
faxto :+31-(0)40-2763633 faxto : +31 (0)499 397919
---------------------------------------------------------------------

Godzilla

unread,
Apr 11, 1998, 3:00:00 AM4/11/98
to

use MessageBeep()

In article <351f76c7.16748923@pmsnnews>, fpij...@best.ms.philips.com
says...

0 new messages