www.pudn.com > 32709.zip > winexception.h


/*************************************************** 
 * Developer: Clinton Jon Selke                    * 
 *   Version: Totally FreeWare (Do what you will)  * 
 *   Section: Exception handling interface         * 
 ***************************************************/ 
 
#ifndef _WINEXCEPTION_H_ 
#define _WINEXCEPTION_H_ 
 
#include  
 
class WinException { 
    public: 
        WinException(const char *msg): _msg(msg) {} 
         
        void doMessageBox(HWND hwnd = 0) { 
            MessageBox(hwnd, _msg, "Exception", MB_ICONEXCLAMATION | MB_OK); 
        } 
    private: 
        const char *_msg; 
}; 
 
#endif /*_WINEXCEPTION_H_*/