CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    4

    Beep on pc speaker

    Windows 98
    Visual C++ 6.0

    Hi!

    I tried do give a Beep on the pc speaker. I used MessageBeep(0xFFFFFFFF) and Beep(...). Both functions work fine under Windows 95 and Windows NT. Under Windows 98 they only produce a klick sound.

    Any ideas?

    Alexander



  2. #2
    Join Date
    May 1999
    Posts
    38

    Re: Beep on pc speaker

    Hi,

    This is because MessageBeep(0xFFFFFFFF), doesn't create the sound but actually tells Windows to make a 'default sound', which in turn windows uses a WAV file which was set for the "Default Sound" setting (under Control Panel->Sounds->Default Sound).

    This is why in Win98 it sounds like a click, the Win98 was told to sound a different WAV for the "Default Sound".


  3. #3
    Join Date
    Aug 1999
    Posts
    4

    Re: Beep on pc speaker

    MSDN:
    Beep:
    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.

    (the sound card was disabled)

    MessageBeep:
    Parameters uType
    Specifies the sound type, as identified by an entry in the [sounds] section of the registry. This parameter can be one of the following values: Value Sound
    0xFFFFFFFF Standard beep using the computer speaker
    MB_ICONASTERISK SystemAsterisk
    MB_ICONEXCLAMATION SystemExclamation
    MB_ICONHAND SystemHand
    MB_ICONQUESTION SystemQuestion
    MB_OK SystemDefault


    The sound always came over the pc speaker and not over the sound card.
    But its a nearly not to hear click sound in Windows 98 and a normal beep in Windows 95 & NT.



  4. #4
    Join Date
    May 1999
    Posts
    38

    Re: Beep on pc speaker

    Hi,

    I don't know, could be that there is a new PC Speaker driver at work under win98, this could cause this strange behaviour.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured