views:

270

answers:

2

Is there a basic function call in MFC that simply plays the input error ping?

I am looking for something analogous to the AfxMessageBox() call that simply plays the ping that is frequently heard when an error is made.

+7  A: 

Look for MessageBeep.

Nick Meyer
Specifically, call MessageBeep(MB_OK) for the default beep sound.
Soo Wei Tan
A: 

Try PlaySound:

PlaySound( (LPCTSTR)SND_ALIAS_SYSTEMHAND, NULL, 
           SND_ALIAS_ID | SND_ASYNC ); // or so
eran