Ah, that makes sense... one more thing to add to our knowledge base.
Thanks.
"Tom Serface" <tom@nospam.camaswood.com> wrote in message
news:F8240F54-0DE8-4948-992D-DC558827C736@microsoft.com...
Thanks for posting the solution to the thread, but that's kind of a weird
reason for a error beep to happen. I'm glad you found it.
I think it beeps when there is a fatal error that would normally display
an error dialog, but because the app is shutting down, the error dialog
does not appear. The beep has happened to me when I called MessageBox()
with a NULL hParentWnd, and while the message was showing, I closed my app
from the tray icon menu (which was still active even though the modal
message box was showing). Since my app owned the message box window,
Windows terminated it but with the beep. Raymond Chen of Microsoft
personally (!) explained to me that the solution was to display the
message box with my main window being the parent of the message box, so
Windows could properly destroy the message box when I closed my main
window (and not wait until the process was destroyed).
-- David