inputmgrsys_t.h
来自「VC++ DEMO, used for the beginners and th」· C头文件 代码 · 共 43 行
H
43 行
// InputMgrSys_t.h: interface for the InputMgrSys_t class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INPUTMGRSYS_T_H__A0CC1FA3_0145_496F_A2FE_DF78B61A2958__INCLUDED_)
#define AFX_INPUTMGRSYS_T_H__A0CC1FA3_0145_496F_A2FE_DF78B61A2958__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Keyboard.h"
class InputMgrSys_t
{
public:
InputMgrSys_t();
virtual ~InputMgrSys_t();
bool UpdateKeyboard();
bool SetMouseBehavior(void * hWnd,unsigned long dwBehavior);
bool CreateMouseDevice();
bool SetKeyboardBehavior(void * hWnd,unsigned long dwBehavior);
bool CreateKeyboardDevice();
bool Create();
KeyVector_t & GetJustPressedKeys() { return m_JustPressedKeys; }
KeyVector_t & GetPressedKeys() { return m_PressedKeys; }
KeyVector_t & GetJustUnPressedKeys() { return m_JustUnPressedKeys; }
protected:
unsigned char GetModifierState(unsigned char nScanCode);
private:
LPDIRECTINPUT8 m_pDI;
LPDIRECTINPUTDEVICE8 m_pDIKeyboard;
LPDIRECTINPUTDEVICE8 m_pDIMouse;
ISModifierState m_ModifierState;
KeyVector_t m_JustPressedKeys; /* vector of keys just pressed */
KeyVector_t m_PressedKeys; /* vector of keys pressed */
KeyVector_t m_JustUnPressedKeys; /* vector of keys just unpressed */
};
#endif // !defined(AFX_INPUTMGRSYS_T_H__A0CC1FA3_0145_496F_A2FE_DF78B61A2958__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?