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

📄 cinput.h

📁 HeightMap_D3D
💻 H
字号:
//-----------------------------------------------------------------------------
// File: cInput.h
// Desc: Header file for the DirectInput. All the DI class is declared here.
//-----------------------------------------------------------------------------
#ifndef cInput_h
#define cInput_h

#define DIM_LEFT 0
#define DIM_RIGHT 1
#define DIM_MIDDLE 2
#define DIM_4 3
#define DIM_5 4
#define DIM_6 5
#define DIM_7 6
#define DIM_8 7

struct CURSOR_VERTEX
{
	int fX, fY;
};

class cInput
{
public:
	cInput();
	HRESULT InitDI();
	HRESULT InitDIKB();
	HRESULT InitDIMouse();

	HRESULT GetDeviceState();
	HRESULT Render();

	HRESULT BKeyDown(int Key);
	HRESULT MKeyDown(int Key);

	int getMPosX() { return MPos.fX; };
	int getMPosY() { return MPos.fY; };

	long getM_BuffX() { return M_Buffer.lX; };
	long getM_BuffY() { return M_Buffer.lY; };
	long getM_BuffZ() { return M_Buffer.lZ; };

	~cInput();
private:
	LPDIRECTINPUT8 m_lpDI;
	LPDIRECTINPUTDEVICE8 m_lpDIKB;
	LPDIRECTINPUTDEVICE8 m_lpDIMouse;

	char chKB_Buffer[256];
	DIMOUSESTATE M_Buffer;
	CURSOR_VERTEX MPos;
};
#endif

⌨️ 快捷键说明

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