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

📄 setcontrol.h

📁 3D俄罗斯方块源码.rar
💻 H
字号:
#ifndef _SETCONTROL_H
#define _SETCONTROL_H
//--------------------------------------------------------------
/**\!File
  *
  *File name:SETCONTROL.h
  *
  *His:add by honghaier @2004/5/7
  *
  *Desc:设置游戏控制类
  */
//---------------------------------------------------------------
#include "dinput.h"
#include <windows.h>
#include "MYLOG.h"
#include "CControl.h"
//---------------------------------------------------------------
     /** CSetControl 类.
       * 设置键盘类
       */
class CSetControl
{
int m_type;//设置哪个
HRESULT         hr; /*返回结果用的句柄 */
LPDIRECTINPUT8  m_lpDI; /*对应的DINPUT对象 */
LPDIRECTINPUTDEVICE8 m_lpDIDevice ;/*创建的设备对象 */
CMYLOG m_Log;/**文件日志   */
public:
	CControl m_control;
	CControl m_control2;
	char m_info[50];
	/** 构造函数.
       * 初始化成员变量
       */
CSetControl();
	/** 析构函数.
       * 初始化成员变量
       */
~CSetControl();
	/**!\brief
	  *初始化键盘设备
	  *\param hWnd代表主窗口
	  *\return 如果成功返回true,否则false
	  */
bool initKeyboard(HWND hWnd);
	/**!\brief
	  *键盘数据处理
	  *\return 返回键盘值
      */
int ProcessKBInput(); 
	/**!\brief
	  *清空资源
	  */
void CleanUpDirectInput();
	/**!\brief
	  *对应键盘名称
	  */
char *DoKeyName(int _i); 
};
#endif

⌨️ 快捷键说明

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