提交 | 用户 | age
|
df0321
|
1 |
#pragma once
|
Q |
2 |
#include "afxwin.h"
|
|
3 |
#include "afxcmn.h"
|
|
4 |
#include "MTerm1View.h"
|
|
5 |
|
d34256
|
6 |
#pragma region DDFINES CMyFormLog 窗体视图
|
df0321
|
7 |
// CMyFormLog 窗体视图
|
Q |
8 |
#define IDC_BUTTON_AND 33101
|
|
9 |
#define IDC_BUTTON_OR 33102
|
|
10 |
#define IDC_BUTTON_VLINE 33103
|
|
11 |
#define IDC_BUTTON_OUT 33104
|
|
12 |
#define IDC_BUTTON_TMCT 33105
|
|
13 |
#define IDC_BUTTON_FUN 33106
|
|
14 |
#define IDC_BUTTON_HLINE 33107
|
|
15 |
#define IDC_BUTTON_NOT 33108
|
|
16 |
#define IDC_BUTTON_INDEX 33109
|
|
17 |
#define IDC_BUTTON_MC 33110
|
|
18 |
#define IDC_BUTTON_MCE 33111
|
|
19 |
|
|
20 |
#define IDC_BUTTON_SET 33201
|
|
21 |
#define IDC_BUTTON_RESET 33202
|
|
22 |
#define IDC_BUTTON_DF 33203
|
|
23 |
#define IDC_BUTTON_END 33204
|
|
24 |
#define IDC_BUTTON_COMPARE 33205
|
|
25 |
#define IDC_BUTTON_PFUN 33206
|
|
26 |
#define IDC_BUTTON_UPDOWN 33207
|
|
27 |
#define IDC_BUTTON_BIT 33208
|
|
28 |
#define IDC_BUTTON_WORD 33209
|
|
29 |
#define IDC_BUTTON_INSTRUCTION1 33210
|
|
30 |
#define IDC_BUTTON_INSTRUCTION2 33211
|
|
31 |
|
|
32 |
#define IDC_BUTTON_PGCONVERT 33301
|
|
33 |
#define IDC_BUTTON_ONLINE 33302
|
|
34 |
#define IDC_BUTTON_OFFLINE 33303
|
|
35 |
#define IDC_BUTTON_COLSE 33304
|
|
36 |
#define IDC_BUTTON_FIND 33305
|
|
37 |
#define IDC_BUTTON_NEXTWIN 33306
|
|
38 |
#define IDC_BUTTON_MONITOR 33307
|
|
39 |
#define IDC_BUTTON_STATUS 33308
|
|
40 |
#define IDC_BUTTON_RUNPROG 33309
|
|
41 |
#define IDC_BUTTON_PLCREAD 33310
|
|
42 |
#define IDC_BUTTON_PLCWRITE 33311
|
|
43 |
|
|
44 |
#define IDC_BUTTON_X 33401
|
|
45 |
#define IDC_BUTTON_Y 33402
|
|
46 |
#define IDC_BUTTON_R 33403
|
|
47 |
#define IDC_BUTTON_L 33404
|
|
48 |
#define IDC_BUTTON_P 33405
|
|
49 |
#define IDC_BUTTON_COMPARE1 33406
|
|
50 |
#define IDC_BUTTON_NOT1 33408
|
|
51 |
#define IDC_BUTTON_T 33501
|
|
52 |
#define IDC_BUTTON_C 33502
|
|
53 |
#define IDC_BUTTON_E 33503
|
|
54 |
#define IDC_BUTTON_UPDOWN1 33507
|
|
55 |
|
|
56 |
#define IDC_BUTTON_D 33701
|
|
57 |
#define IDC_BUTTON_F 33702
|
|
58 |
#define IDC_BUTTON_NEQ 33706
|
|
59 |
#define IDC_BUTTON_GT 33707
|
|
60 |
#define IDC_BUTTON_LT 33708
|
|
61 |
|
|
62 |
#define IDC_BUTTON_TMX 34701
|
|
63 |
#define IDC_BUTTON_TMY 34702
|
|
64 |
#define IDC_BUTTON_TMR 34703
|
|
65 |
#define IDC_BUTTON_TML 34704
|
|
66 |
#define IDC_BUTTON_CT 34706
|
|
67 |
|
d34256
|
68 |
#pragma endregion
|
Z |
69 |
|
|
70 |
|
df0321
|
71 |
typedef struct tagStructButton {
|
Q |
72 |
int nID;
|
|
73 |
CString sCaption;
|
|
74 |
|
|
75 |
}structButton;
|
|
76 |
|
|
77 |
struct tagInputCell
|
|
78 |
{
|
|
79 |
char OP = CMTerm1View::typeNO;
|
|
80 |
bool bnot = false;
|
|
81 |
bool bpp = false;
|
|
82 |
bool bpn = false;
|
|
83 |
bool bcmpEq = false;
|
|
84 |
bool bcmpLt = false;
|
|
85 |
bool bcmpGt = false;
|
|
86 |
bool bDouble = false;
|
|
87 |
bool bDouble1 = false; //for -||-D and -||- turn
|
|
88 |
bool bFloat = false;
|
|
89 |
bool bFloat1 = false;
|
|
90 |
bool bLeftLineUp = false;
|
|
91 |
bool brightLineUp = false;
|
|
92 |
int param = 0;
|
|
93 |
CString sCellName;
|
|
94 |
CString sParamName;
|
|
95 |
CString num = _T("");
|
d34256
|
96 |
int row = 0;
|
Z |
97 |
int col = 0;
|
|
98 |
|
df0321
|
99 |
void clear() { OP = 0; bnot = 0; bpp = 0; bpn = 0; bcmpEq = 0; bcmpLt = 0;
|
Q |
100 |
bcmpGt = 0; bDouble = 0; bDouble1 = 0; bFloat = 0; bFloat1 = 0; bLeftLineUp = 0; brightLineUp = 0;
|
|
101 |
param = 0; sCellName.Empty(); num.Empty();
|
|
102 |
}
|
|
103 |
};
|
|
104 |
|
|
105 |
|
|
106 |
class CMyFormInputShow : public CFormView
|
|
107 |
{
|
|
108 |
DECLARE_DYNCREATE(CMyFormInputShow)
|
|
109 |
|
|
110 |
protected:
|
|
111 |
CMyFormInputShow(); // 动态创建所使用的受保护的构造函数
|
|
112 |
virtual ~CMyFormInputShow();
|
|
113 |
|
|
114 |
public:
|
|
115 |
enum { IDD = IDD_FORM_INPUTSHOW};
|
d34256
|
116 |
|
Z |
117 |
|
|
118 |
|
df0321
|
119 |
#ifdef _DEBUG
|
Q |
120 |
virtual void AssertValid() const;
|
|
121 |
#ifndef _WIN32_WCE
|
|
122 |
virtual void Dump(CDumpContext& dc) const;
|
|
123 |
#endif
|
|
124 |
#endif
|
|
125 |
CButton m_buttons[6][3][11];
|
|
126 |
CButton m_NumButtons[18];
|
|
127 |
CButton m_CmdButtons[4];
|
|
128 |
int m_Lines = 3;
|
|
129 |
CFont font1;
|
|
130 |
int current_btn_window = 0;
|
|
131 |
|
ad1b4b
|
132 |
CMTerm1View::stCell focusCell;
|
Z |
133 |
|
df0321
|
134 |
tagInputCell m_InputCell;
|
Q |
135 |
|
|
136 |
CEdit m_edit_input;
|
|
137 |
|
|
138 |
// tagInputCell localInputCell;
|
|
139 |
protected:
|
|
140 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
141 |
|
|
142 |
DECLARE_MESSAGE_MAP()
|
|
143 |
public:
|
|
144 |
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
|
145 |
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
146 |
afx_msg void OnDestroy();
|
|
147 |
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
148 |
virtual void OnInitialUpdate();
|
|
149 |
afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
|
|
150 |
// CEdit m_edit_log;
|
|
151 |
// CRichEditCtrl m_richedit_log;
|
|
152 |
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
153 |
|
|
154 |
// virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHandler);
|
|
155 |
void SetBtnDisplay(int n = 0);
|
|
156 |
void SetBtnDisplayESC(int n=0);
|
|
157 |
|
|
158 |
|
|
159 |
afx_msg void OnBnClickedButton1();
|
|
160 |
afx_msg void OnBnClickedBtnAnd();
|
|
161 |
afx_msg void OnBnClickedBtnOr();
|
|
162 |
afx_msg void OnBnClickedBtnVline();
|
|
163 |
afx_msg void OnBnClickedBtnOut();
|
|
164 |
afx_msg void OnBnClickedBtnTmCt();
|
|
165 |
afx_msg void OnBnClickedBtnFun();
|
|
166 |
afx_msg void OnBnClickedBtnHLine();
|
|
167 |
afx_msg void OnBnClickedBtnNot();
|
|
168 |
afx_msg void OnBnClickedBtnIndex();
|
|
169 |
afx_msg void OnBnClickedBtnMc();
|
|
170 |
afx_msg void OnBnClickedBtnMce();
|
|
171 |
|
|
172 |
afx_msg void OnBnClickedBtnSet();
|
|
173 |
afx_msg void OnBnClickedBtnReset();
|
|
174 |
afx_msg void OnBnClickedBtnDf();
|
|
175 |
afx_msg void OnBnClickedBtnEnd();
|
|
176 |
afx_msg void OnBnClickedBtnCompare();
|
|
177 |
afx_msg void OnBnClickedBtnPFun();
|
|
178 |
afx_msg void OnBnClickedBtnUpDown();
|
|
179 |
afx_msg void OnBnClickedBtnBit();
|
|
180 |
afx_msg void OnBnClickedBtnWord();
|
|
181 |
afx_msg void OnBnClickedBtnInc1();
|
|
182 |
afx_msg void OnBnClickedBtnInc2();
|
|
183 |
|
|
184 |
afx_msg void OnBnClickedBtnPgConvert();
|
|
185 |
afx_msg void OnBnClickedBtnOnline();
|
|
186 |
afx_msg void OnBnClickedBtnOffline();
|
|
187 |
afx_msg void OnBnClickedBtnClose();
|
|
188 |
afx_msg void OnBnClickedBtnFind();
|
|
189 |
afx_msg void OnBnClickedBtnNextWin();
|
|
190 |
afx_msg void OnBnClickedBtnMonitor();
|
|
191 |
afx_msg void OnBnClickedBtnStatus();
|
|
192 |
afx_msg void OnBnClickedBtnRunProg();
|
|
193 |
afx_msg void OnBnClickedBtnPlcRead();
|
|
194 |
afx_msg void OnBnClickedBtnPlcWrite();
|
|
195 |
|
|
196 |
afx_msg void OnBnClickedBtnX();
|
|
197 |
afx_msg void OnBnClickedBtnY();
|
|
198 |
afx_msg void OnBnClickedBtnR();
|
|
199 |
afx_msg void OnBnClickedBtnL();
|
|
200 |
afx_msg void OnBnClickedBtnP();
|
|
201 |
afx_msg void OnBnClickedBtnCompare1();
|
|
202 |
afx_msg void OnBnClickedBtnT();
|
|
203 |
afx_msg void OnBnClickedBtnC();
|
|
204 |
afx_msg void OnBnClickedBtnE();
|
|
205 |
|
|
206 |
afx_msg void OnBnClickedBtnTmx();
|
|
207 |
afx_msg void OnBnClickedBtnTmy();
|
|
208 |
afx_msg void OnBnClickedBtnTmr();
|
|
209 |
afx_msg void OnBnClickedBtnTml();
|
|
210 |
afx_msg void OnBnClickedBtnCt();
|
|
211 |
|
|
212 |
afx_msg void OnBnClickedBtnD();
|
|
213 |
afx_msg void OnBnClickedBtnF();
|
|
214 |
afx_msg void OnBnClickedBtnNEQ();
|
|
215 |
afx_msg void OnBnClickedBtnGT();
|
|
216 |
afx_msg void OnBnClickedBtnLT();
|
|
217 |
|
|
218 |
afx_msg void OnBtn0();
|
|
219 |
afx_msg void OnBtn1();
|
|
220 |
afx_msg void OnBtn2();
|
|
221 |
afx_msg void OnBtn3();
|
|
222 |
afx_msg void OnBtn4();
|
|
223 |
afx_msg void OnBtn5();
|
|
224 |
afx_msg void OnBtn6();
|
|
225 |
afx_msg void OnBtn7();
|
|
226 |
afx_msg void OnBtn8();
|
|
227 |
afx_msg void OnBtn9();
|
|
228 |
afx_msg void OnBtnA();
|
|
229 |
afx_msg void OnBtnB();
|
|
230 |
afx_msg void OnBtnC();
|
|
231 |
afx_msg void OnBtnD();
|
|
232 |
afx_msg void OnBtnE();
|
|
233 |
afx_msg void OnBtnF();
|
|
234 |
afx_msg void OnBtnMinus();
|
|
235 |
afx_msg void OnBtnDot();
|
|
236 |
afx_msg void OnBtnRet();
|
|
237 |
afx_msg void OnBtnInsert();
|
|
238 |
afx_msg void OnBtnDelete();
|
|
239 |
afx_msg void OnBtnEsc();
|
|
240 |
|
|
241 |
int SetDisplay(int inputInfo);
|
|
242 |
int SetDisplay1(int inputInfo);
|
|
243 |
// int UpdateDisplay();
|
|
244 |
int display(tagInputCell stDisplayCell);
|
|
245 |
int SetCurCellPos(int nRow, int nCol, CMTerm1View::stCell theCell);
|
|
246 |
|
|
247 |
void stInit();
|
|
248 |
|
|
249 |
|
|
250 |
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
|
|
251 |
};
|
|
252 |
|
|
253 |
|