CWinApp::ProcessWndProcException
Visual Studio 2012
The framework calls this member function whenever the handler does not catch an exception thrown in one of your application's message or command handlers.
virtual LRESULT ProcessWndProcException( CException* e, const MSG* pMsg );
Do not call this member function directly.
The default implementation of this member function creates a message box. If the uncaught exception originates with a menu, toolbar, or accelerator command failure, the message box displays a "Command failed" message; otherwise, it displays an "Internal application error" message.
Override this member function to provide global handling of your exceptions. Only call the base functionality if you wish the message box to be displayed.