DIKeyState.inl
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: DIKeyState.inl
- // Inlines for DIKeyState
- inline DWORD CDIKeyState::GetKeyCode(void) const
- {
- return m_dwKeyCode;
- }
- inline DWORD CDIKeyState::GetKeyTimeStamp(void) const
- {
- return m_dwKeyTimeStamp;
- }
- inline bool CDIKeyState::IsCtrlPressed(void) const
- {
- return ((m_dwControlKeyState & KB_LCTRLMASK) != 0) ||
- ((m_dwControlKeyState & KB_RCTRLMASK) != 0);
- }
- inline bool CDIKeyState::IsAltPressed(void) const
- {
- return ((m_dwControlKeyState & KB_LALTMASK) != 0) ||
- ((m_dwControlKeyState & KB_RALTMASK) != 0);
- }
- inline bool CDIKeyState::IsShiftPressed(void) const
- {
- return ((m_dwControlKeyState & KB_LSHIFTMASK) != 0) ||
- ((m_dwControlKeyState & KB_RSHIFTMASK) != 0);
- }
- inline bool CDIKeyState::IsDBCSKeyCode(void) const
- {
- return ((m_dwControlKeyState & KB_DBCSMASK) != 0);
- }
- inline void CDIKeyState::ClearDBCSFlag(void)
- {
- m_dwControlKeyState &= ~KB_DBCSMASK;
- }