#ifndef _COMMON_ACCELERATOR_HPP_
#define _COMMON_ACCELERATOR_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif

class GUIWindow;

class Accelerator
{
public:
  Accelerator();
	Accelerator(const String &strTableName,HINSTANCE hInstance=GetModuleHandle(0));
	Accelerator(UINT resID,HINSTANCE hInstance=GetModuleHandle(0));
	virtual ~Accelerator();
	bool loadAccelerators(const String &strTableName,HINSTANCE hInstance=GetModuleHandle(0));
	bool loadAccelerators(UINT resID,HINSTANCE hInstance=GetModuleHandle(0));
  bool translate(const GUIWindow &parent,MSG &msg)const;
  bool translateMDISysAccelerator(const GUIWindow &parent,MSG &msg)const;
  void destroy(void);
	bool isOkay(void)const;
private:
  Accelerator &operator=(const Accelerator &accelerator);  
  HACCEL mhAccelerator;
};
#endif
