rlm@1
|
1 ////////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
2 // Copyright (C) 1998 by Thierry Maurel
|
rlm@1
|
3 // All rights reserved
|
rlm@1
|
4 //
|
rlm@1
|
5 // Distribute freely, except: don't remove my name from the source or
|
rlm@1
|
6 // documentation (don't take credit for my work), mark your changes (don't
|
rlm@1
|
7 // get me blamed for your possible bugs), don't alter or remove this
|
rlm@1
|
8 // notice.
|
rlm@1
|
9 // No warrantee of any kind, express or implied, is included with this
|
rlm@1
|
10 // software; use at your own risk, responsibility for damages (if any) to
|
rlm@1
|
11 // anyone resulting from the use of this software rests entirely with the
|
rlm@1
|
12 // user.
|
rlm@1
|
13 //
|
rlm@1
|
14 // Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
rlm@1
|
15 // I'll try to keep a version up to date. I can be reached as follows:
|
rlm@1
|
16 // tmaurel@caramail.com (or tmaurel@hol.fr)
|
rlm@1
|
17 //
|
rlm@1
|
18 ////////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
19 // File : KeyboardEdit.h
|
rlm@1
|
20 // Project : AccelsEditor
|
rlm@1
|
21 ////////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
22 // Version : 1.0 * Authors : A.Lebatard + T.Maurel
|
rlm@1
|
23 // Date : 17.08.98
|
rlm@1
|
24 //
|
rlm@1
|
25 // Remarks :
|
rlm@1
|
26 //
|
rlm@1
|
27 ////////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
28 // Modified by the VBA-rr Team
|
rlm@1
|
29
|
rlm@1
|
30 #if !defined(AFX_KEYBOARDEDIT_H__88E35AB0_2E23_11D2_BA24_0060B0B5E151__INCLUDED_)
|
rlm@1
|
31 #define AFX_KEYBOARDEDIT_H__88E35AB0_2E23_11D2_BA24_0060B0B5E151__INCLUDED_
|
rlm@1
|
32
|
rlm@1
|
33 #if _MSC_VER >= 1000
|
rlm@1
|
34 #pragma once
|
rlm@1
|
35 #endif // _MSC_VER >= 1000
|
rlm@1
|
36 // KeyboardEdit.h : header file
|
rlm@1
|
37 //
|
rlm@1
|
38
|
rlm@1
|
39 /////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
40 // CKeyboardEdit window
|
rlm@1
|
41
|
rlm@1
|
42 class CKeyboardEdit : public CEdit
|
rlm@1
|
43 {
|
rlm@1
|
44 DECLARE_DYNAMIC(CKeyboardEdit) // what will this do?
|
rlm@1
|
45
|
rlm@1
|
46 // Construction
|
rlm@1
|
47 public:
|
rlm@1
|
48 CKeyboardEdit();
|
rlm@1
|
49
|
rlm@1
|
50 // Operations
|
rlm@1
|
51 public:
|
rlm@1
|
52 void ResetKey();
|
rlm@1
|
53 void AllKeyUp();
|
rlm@1
|
54 bool GetAccelKey(WORD &wVirtKey, bool &bCtrl, bool &bAlt, bool &bShift) const;
|
rlm@1
|
55 bool GetJamKey(WORD &wJamKey) const;
|
rlm@1
|
56 bool IsDefined() const;
|
rlm@1
|
57 bool IsFinished() const;
|
rlm@1
|
58
|
rlm@1
|
59 // Overrides
|
rlm@1
|
60 // ClassWizard generated virtual function overrides
|
rlm@1
|
61 //{{AFX_VIRTUAL(CKeyboardEdit)
|
rlm@1
|
62 public:
|
rlm@1
|
63 virtual BOOL PreTranslateMessage(MSG *pMsg);
|
rlm@1
|
64 virtual ~CKeyboardEdit();
|
rlm@1
|
65 //}}AFX_VIRTUAL
|
rlm@1
|
66
|
rlm@1
|
67 protected:
|
rlm@1
|
68 void DisplayKeyboardString();
|
rlm@1
|
69
|
rlm@1
|
70 // Attributes
|
rlm@1
|
71 protected:
|
rlm@1
|
72 BYTE m_keys[256];
|
rlm@1
|
73 bool m_bForceUpdate;
|
rlm@1
|
74 bool m_bCtrlPressed;
|
rlm@1
|
75 bool m_bAltPressed;
|
rlm@1
|
76 bool m_bShiftPressed;
|
rlm@1
|
77 WORD m_wVirtKey;
|
rlm@1
|
78 WORD m_wJamKey;
|
rlm@1
|
79
|
rlm@1
|
80 // Generated message map functions
|
rlm@1
|
81 public:
|
rlm@1
|
82 //{{AFX_MSG(CKeyboardEdit)
|
rlm@1
|
83 afx_msg BOOL OnEnChange();
|
rlm@1
|
84 afx_msg BOOL OnEnSetfocus();
|
rlm@1
|
85 afx_msg BOOL OnEnKillfocus();
|
rlm@1
|
86 //}}AFX_MSG
|
rlm@1
|
87
|
rlm@1
|
88 DECLARE_MESSAGE_MAP()
|
rlm@1
|
89 };
|
rlm@1
|
90
|
rlm@1
|
91 /////////////////////////////////////////////////////////////////////////////
|
rlm@1
|
92
|
rlm@1
|
93 //{{AFX_INSERT_LOCATION}}
|
rlm@1
|
94 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
rlm@1
|
95
|
rlm@1
|
96 #endif // !defined(AFX_KEYBOARDEDIT_H__88E35AB0_2E23_11D2_BA24_0060B0B5E151__INCLUDED_)
|