Notifying the User of Errors - Example

The following example flashes a window and plays the system exclamation sound.

FlashWindow(hwnd, TRUE); // invert the title bar 
Sleep(500);              // wait a bit 
FlashWindow(hwnd, TRUE); // invert again 
 
// Play the system exclamation sound. 
 
MessageBeep(MB_ICONEXCLAMATION);