rlm@1: #if !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_) rlm@1: #define AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_ rlm@1: rlm@1: #if _MSC_VER > 1000 rlm@1: #pragma once rlm@1: #endif // _MSC_VER > 1000 rlm@1: // -*- C++ -*- rlm@1: // Joypad.h : header file rlm@1: // rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // JoypadEditControl window rlm@1: rlm@1: class JoypadEditControl : public CEdit rlm@1: { rlm@1: // Construction rlm@1: public: rlm@1: JoypadEditControl(); rlm@1: rlm@1: // Attributes rlm@1: public: rlm@1: // Operations rlm@1: public: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(JoypadEditControl) rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: public: rlm@1: virtual BOOL PreTranslateMessage(MSG *pMsg); rlm@1: afx_msg LRESULT OnJoyConfig(WPARAM wParam, LPARAM lParam); rlm@1: virtual ~JoypadEditControl(); rlm@1: rlm@1: // Generated message map functions rlm@1: protected: rlm@1: //{{AFX_MSG(JoypadEditControl) rlm@1: afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); rlm@1: //}}AFX_MSG rlm@1: rlm@1: DECLARE_MESSAGE_MAP() rlm@1: }; rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // JoypadConfig dialog rlm@1: rlm@1: class JoypadConfig : public CDialog rlm@1: { rlm@1: // Construction rlm@1: public: rlm@1: void assignKeys(); rlm@1: void assignKey(int id, int key); rlm@1: JoypadConfig(int w, CWnd*pParent = NULL); // standard constructor rlm@1: rlm@1: // Dialog Data rlm@1: //{{AFX_DATA(JoypadConfig) rlm@1: enum { IDD = IDD_CONFIG }; rlm@1: JoypadEditControl up; rlm@1: JoypadEditControl speed; rlm@1: JoypadEditControl right; rlm@1: JoypadEditControl left; rlm@1: JoypadEditControl down; rlm@1: JoypadEditControl capture; rlm@1: JoypadEditControl buttonStart; rlm@1: JoypadEditControl buttonSelect; rlm@1: JoypadEditControl buttonR; rlm@1: JoypadEditControl buttonL; rlm@1: JoypadEditControl buttonGS; rlm@1: JoypadEditControl buttonB; rlm@1: JoypadEditControl buttonA; rlm@1: //}}AFX_DATA rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(JoypadConfig) rlm@1: protected: rlm@1: virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: protected: rlm@1: UINT timerId; rlm@1: int which; rlm@1: rlm@1: // Generated message map functions rlm@1: //{{AFX_MSG(JoypadConfig) rlm@1: afx_msg void OnCancel(); rlm@1: afx_msg void OnOk(); rlm@1: afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); rlm@1: afx_msg void OnDestroy(); rlm@1: afx_msg void OnTimer(UINT nIDEvent); rlm@1: afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); rlm@1: virtual BOOL OnInitDialog(); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: }; rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // MotionConfig dialog rlm@1: rlm@1: class MotionConfig : public CDialog rlm@1: { rlm@1: // Construction rlm@1: public: rlm@1: void assignKeys(); rlm@1: void assignKey(int id, int key); rlm@1: MotionConfig(CWnd*pParent = NULL); // standard constructor rlm@1: rlm@1: // Dialog Data rlm@1: //{{AFX_DATA(MotionConfig) rlm@1: enum { IDD = IDD_MOTION_CONFIG }; rlm@1: JoypadEditControl up; rlm@1: JoypadEditControl right; rlm@1: JoypadEditControl left; rlm@1: JoypadEditControl down; rlm@1: //}}AFX_DATA rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(MotionConfig) rlm@1: protected: rlm@1: virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: protected: rlm@1: // Generated message map functions rlm@1: //{{AFX_MSG(MotionConfig) rlm@1: afx_msg void OnCancel(); rlm@1: afx_msg void OnOk(); rlm@1: afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); rlm@1: afx_msg void OnDestroy(); rlm@1: virtual BOOL OnInitDialog(); rlm@1: afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); rlm@1: afx_msg void OnTimer(UINT nIDEvent); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: private: rlm@1: UINT timerId; rlm@1: }; rlm@1: //{{AFX_INSERT_LOCATION}} rlm@1: // Microsoft Visual C++ will insert additional declarations immediately before the previous line. rlm@1: rlm@1: #endif // !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_)