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

📄 accelerator.h

📁 c+++ game uploading now
💻 H
字号:
/**
 @file
 Interface of the Win::Accelerator class
*/
#if !defined _ACCELERATOR_H_
#define _ACCELERATOR_H_
#include "WinException.h"

namespace Win
{
    /**
      realizes the win32 keyboard accelerator. */ 
    class Accelerator
    {
    public:
        /**
           Constructor
           @param hInstance is a handle to the application instance.
           @param lpTableName identifies the accelerator table used.
           @exception throws Win::Exception upon failure.*/
        Accelerator(HINSTANCE hInstance, LPCTSTR lpTableName)
        {
            if(0==(_haccel=::LoadAccelerators(hInstance, lpTableName)))
                throw Win::Exception("Failed to load accelerator table.");
        }

        /**
            type conversion to HACCEL */
        operator HACCEL() 
        { 
            return _haccel; 
        }
    private:

        /**
            accelerator handle */
        HACCEL _haccel;
    };
}
#endif //_ACCELERATOR_H_

⌨️ 快捷键说明

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