⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winexception.h

📁 c+++ game uploading now
💻 H
字号:
/**
 @file
 Interface of the Win::Exception class.
*/
#if !defined _WINEXCEPTION_H_
#define _WINEXCEPTION_H_
#include <windows.h>

namespace Win
{
    /**
     Exception class, used to deal with system error conditions */
    class Exception
    {
    public:
        /**
         @param msg error message */
        Exception(char* msg)
          :_err(::GetLastError()),
           _msg(msg)
        {}
    
        /**
          @return errorcode retrieved with GetLastError Win32 API. */
        DWORD GetError() const 
        { 
            return _err; 
        }

        /**
         displays a nifty dialog box describing the error */
        void Show() const;

    private:
        DWORD _err;
        char* _msg;
        static char const msgFormat[];
    };
}
#endif // _WINEXCEPTION_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -