?? setcontrol.h
字號:
#ifndef _SETCONTROL_H
#define _SETCONTROL_H
//--------------------------------------------------------------
/**\!File
*
*File name:SETCONTROL.h
*
*His:add by honghaier @2004/5/7
*
*Desc:設(shè)置游戲控制類
*/
//---------------------------------------------------------------
#include "dinput.h"
#include <windows.h>
#include "MYLOG.h"
#include "CControl.h"
//---------------------------------------------------------------
/** CSetControl 類.
* 設(shè)置鍵盤類
*/
class CSetControl
{
int m_type;//設(shè)置哪個
HRESULT hr; /*返回結(jié)果用的句柄 */
LPDIRECTINPUT8 m_lpDI; /*對應(yīng)的DINPUT對象 */
LPDIRECTINPUTDEVICE8 m_lpDIDevice ;/*創(chuàng)建的設(shè)備對象 */
CMYLOG m_Log;/**文件日志 */
public:
CControl m_control;
CControl m_control2;
char m_info[50];
/** 構(gòu)造函數(shù).
* 初始化成員變量
*/
CSetControl();
/** 析構(gòu)函數(shù).
* 初始化成員變量
*/
~CSetControl();
/**!\brief
*初始化鍵盤設(shè)備
*\param hWnd代表主窗口
*\return 如果成功返回true,否則false
*/
bool initKeyboard(HWND hWnd);
/**!\brief
*鍵盤數(shù)據(jù)處理
*\return 返回鍵盤值
*/
int ProcessKBInput();
/**!\brief
*清空資源
*/
void CleanUpDirectInput();
/**!\brief
*對應(yīng)鍵盤名稱
*/
char *DoKeyName(int _i);
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -