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