//========================================================================= // A3dVKeyTypedDetect.cpp : Special class for keydown value detection. // Used for keyboard configuration. // MUST BE USED WITH A3d_KeyboardConfDlg class // // Version 1.0 // Creation date 30/10/96 // Author: Philippe Touillaud // // Revision date // Author: // // (c) Ubi Pictures 1996 // //========================================================================= #include "stdafx.h" #ifdef ACTIVE_EDITOR #include "itf/A3dKeybo.hpp" #include "itf/A3dVKeyT.hpp" ///////////////////////////////////////////////////////////////////////////// // A3d_VKeyTypedDetect A3d_VKeyTypedDetect::A3d_VKeyTypedDetect() { } A3d_VKeyTypedDetect::~A3d_VKeyTypedDetect() { } BEGIN_MESSAGE_MAP(A3d_VKeyTypedDetect, CListBox) //{{AFX_MSG_MAP(A3d_VKeyTypedDetect) ON_WM_KEYDOWN() ON_WM_KEYUP() // CPA2 Corneliu Babiuc (Alt Key) 14-05-98 ON_WM_SYSKEYDOWN() ON_WM_SYSKEYUP() // END CPA2 Corneliu Babiuc (Alt Key) 14-05-98 //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // A3d_VKeyTypedDetect message handlers void A3d_VKeyTypedDetect::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { A3d_KeyboardConfDlg* poParentDlg; poParentDlg = (A3d_KeyboardConfDlg*)(GetParent()); ASSERT(poParentDlg != NULL); // Send the detected key to the treatment function. poParentDlg->mfn_vDetectKeyDown(nChar, nRepCnt, nFlags); } void A3d_VKeyTypedDetect::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { A3d_KeyboardConfDlg* poParentDlg; poParentDlg = (A3d_KeyboardConfDlg*)(GetParent()); ASSERT(poParentDlg != NULL); // Resets the possible combinated key. poParentDlg->mfn_vResetsCombinatedKey(nChar); } /* CPA2 Corneliu Babiuc (Alt Key) 14-05-98 */ void A3d_VKeyTypedDetect::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { A3d_KeyboardConfDlg* poParentDlg; poParentDlg = (A3d_KeyboardConfDlg*)(GetParent()); ASSERT(poParentDlg != NULL); // Send the detected key to the treatment function. poParentDlg->mfn_vDetectKeyDown(nChar, nRepCnt, nFlags); } void A3d_VKeyTypedDetect::OnSysKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { A3d_KeyboardConfDlg* poParentDlg; poParentDlg = (A3d_KeyboardConfDlg*)(GetParent()); ASSERT(poParentDlg != NULL); // Resets the possible combinated key. poParentDlg->mfn_vResetsCombinatedKey(nChar); } /* END CPA2 Corneliu Babiuc (Alt Key) 14-05-98 */ #endif // ACTIVE_EDITOR