📄 di.h
字号:
#ifndef _DI_H
#define _DI_H
#ifndef INITGUID
#define INITGUID
#endif
#include <dinput.h>
#define DINPUT_BUFFERSIZE 16
class CDI
{
//Direct input响应记录值:
public:
DWORD m_dwKeyBoard;
bool m_bKeyDown[256];
DWORD m_dwMouse;
POINT m_MousePoint;//事实上是鼠标偏移量;
//Direct input设备:
public:
LPDIRECTINPUT m_lpDI; // DirectInput object
LPDIRECTINPUTDEVICE m_lpDID_Mouse; // DirectInput device--mouse
LPDIRECTINPUTDEVICE m_lpDID_Keyboard; // DirectInput device--keyboard
public:
CDI();
~CDI();
CDI(HWND hWnd);
public:
bool Initialize(HWND hWnd);
HRESULT UpDateInputState(void);
void Destroy();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -