提交 | 用户 | age
|
418cb3
|
1 |
// MyDlgBarFuncKey.cpp: 实现文件
|
Q |
2 |
//
|
|
3 |
|
|
4 |
#include "pch.h"
|
|
5 |
#include "MTerm1.h"
|
|
6 |
#include "MyDlgBarFuncKey.h"
|
|
7 |
#include "afxdialogex.h"
|
|
8 |
|
|
9 |
#include "MainFrm.h"
|
|
10 |
|
|
11 |
|
|
12 |
// CMyDlgBarFuncKey 对话框
|
|
13 |
|
|
14 |
CMyDlgBarFuncKey::structButton myButtons[6][3][11] =
|
|
15 |
{
|
|
16 |
{{33101,_T("-| |-"), 33102,_T("└┤├┘") ,33103,_T("|"), 33104,_T("-[OUT]") ,33105,_T("TM/CT") ,33106,_T("Fun") ,33107,_T("——") ,33108,_T("NOT/") ,33109,_T("INDEX") ,33110,_T("(MC)") ,33111,_T("(MCE)") },
|
|
17 |
{33201,_T("-<SET>-"), 33202,_T("-<RESET>") ,33203,_T("(DF(/))"), 33204,_T("(END)") ,33205,_T("比较") ,33206,_T("PFun") ,33207,_T("↑↓") ,33208,_T("[位]") ,33209,_T("[字]") ,33210,_T("指令1") ,33211,_T("指令2") },
|
|
18 |
{33301,_T("PG转换"), 33302,_T("在线") ,33303,_T("离线"), 33304,_T("关闭") ,33305,_T("查找") ,33306,_T("次Win") ,33307,_T("监控Go") ,33308,_T("状态") ,33309,_T("Run/Prog") ,33310,_T("PLC读取") ,33311,_T("PLC写入") } },
|
|
19 |
|
|
20 |
{{33401,_T("X"), 33402,_T("Y") ,33403,_T("R"), 33404,_T("L") ,33405,_T("P") ,33406,_T("比较") ,33407,_T("") ,33408,_T("NOT/") ,33409,_T("INDEX") ,33410,_T("No.清除") ,33411,_T("") },
|
|
21 |
{33501,_T("T"), 33502,_T("C") ,33503,_T("E"), 33504,_T("") ,33505,_T("") ,33506,_T("") ,33507,_T("↑↓") ,33508,_T("") ,33509,_T("") ,33510,_T("") ,33511,_T("") },
|
|
22 |
{33601,_T(""), 33602,_T("") ,33603,_T(""), 33604,_T("") ,33605,_T("") ,33606,_T("") ,33607,_T("") ,33608,_T("") ,33609,_T("") ,33610,_T("") ,33611,_T("") }},
|
|
23 |
|
|
24 |
{{33701,_T("D"), 33702,_T("F") ,33703,_T(""), 33704,_T("") ,33705,_T("") ,33706,_T("=") ,33707,_T(">") ,33708,_T("<") ,33709,_T("") ,33710,_T("") ,33711,_T("") },
|
|
25 |
{33801,_T(""), 33802,_T("") ,33803,_T(""), 33804,_T("") ,33805,_T("") ,33806,_T("") ,33807,_T("") ,33808,_T("") ,33809,_T("") ,33810,_T("") ,33811,_T("") },
|
|
26 |
{33901,_T(""), 33902,_T("") ,33903,_T(""), 33904,_T("") ,33905,_T("") ,33906,_T("") ,33907,_T("") ,33908,_T("") ,33909,_T("") ,33910,_T("") ,33911,_T("") }},
|
|
27 |
|
|
28 |
{{34101,_T("WX"), 34102,_T("WY") ,34103,_T("WR"), 34104,_T("WL") ,34105,_T("DT") ,34106,_T("LD") ,34107,_T("FL") ,34108,_T("") ,34109,_T("INDEX") ,34110,_T("No.清除") ,34111,_T("") },
|
|
29 |
{34201,_T("SV"), 34202,_T("EV") ,34203,_T("K"), 34204,_T("H") ,34205,_T("M") ,34206,_T("f") ,34207,_T("") ,34208,_T("") ,34209,_T("") ,34210,_T("") ,34211,_T("") },
|
|
30 |
{34301,_T("PG转换"), 34302,_T("") ,34303,_T(""), 34304,_T("") ,34305,_T("") ,34306,_T("") ,34307,_T("") ,34308,_T("") ,34309,_T("") ,34310,_T("") ,34311,_T("") }},
|
|
31 |
|
|
32 |
{{34401,_T("IX(I0)"), 34402,_T("IY(I1)") ,34403,_T("I2"), 34404,_T("I3") ,34405,_T("I4") ,34406,_T("I5") ,34407,_T("I6") ,34408,_T("I7") ,34409,_T("I8") ,34410,_T("") ,34411,_T("") },
|
|
33 |
{34501,_T("I9"), 34502,_T("IA") ,34503,_T("IB"), 34504,_T("IC") ,34505,_T("ID") ,34506,_T("") ,34507,_T("↑↓") ,34508,_T("") ,34509,_T("") ,34510,_T("") ,34511,_T("") },
|
|
34 |
{34601,_T(""), 34602,_T("") ,34603,_T(""), 34604,_T("") ,34605,_T("") ,34606,_T("") ,34607,_T("") ,34608,_T("") ,34609,_T("") ,34610,_T("") ,34611,_T("") }},
|
|
35 |
|
|
36 |
{{34701,_T("TMX"), 34702,_T("TMY") ,34703,_T("TMR"), 34704,_T("TML") ,34705,_T("") ,34706,_T("-[CT]-") ,34707,_T("") ,34708,_T("") ,34709,_T("INDEX") ,34710,_T("") ,34711,_T("") },
|
|
37 |
{34801,_T(""), 34802,_T("") ,34803,_T(""), 34804,_T("") ,34805,_T("") ,34806,_T("") ,34807,_T("") ,34808,_T("") ,34809,_T("") ,34810,_T("") ,34811,_T("") },
|
|
38 |
{34901,_T(""), 34902,_T("") ,34903,_T(""), 34904,_T("") ,34905,_T("") ,34906,_T("") ,34907,_T("") ,34908,_T("") ,34909,_T("") ,3490,_T("") ,34911,_T("") }},
|
|
39 |
};
|
|
40 |
|
|
41 |
static int myButtonCount = sizeof(myButtons[6][3][11]) / sizeof(CMyDlgBarFuncKey::structButton);
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
IMPLEMENT_DYNAMIC(CMyDlgBarFuncKey, CDialogBar)
|
|
48 |
|
|
49 |
CMyDlgBarFuncKey::CMyDlgBarFuncKey(CWnd* pParent /*=nullptr*/)
|
|
50 |
{
|
|
51 |
|
|
52 |
}
|
|
53 |
|
|
54 |
CMyDlgBarFuncKey::~CMyDlgBarFuncKey()
|
|
55 |
{
|
|
56 |
}
|
|
57 |
|
|
58 |
void CMyDlgBarFuncKey::DoDataExchange(CDataExchange* pDX)
|
|
59 |
{
|
|
60 |
|
|
61 |
}
|
|
62 |
|
|
63 |
BEGIN_MESSAGE_MAP(CMyDlgBarFuncKey, CDialogBar)
|
|
64 |
ON_MESSAGE(WM_INITDIALOG, CMyDlgBarFuncKey::OnInitDialog)
|
|
65 |
ON_BN_CLICKED(IDC_BUTTON1, &CMyDlgBarFuncKey::OnBnClickedButton1)
|
|
66 |
|
|
67 |
ON_BN_CLICKED(IDC_BUTTON_AND, &CMyDlgBarFuncKey::OnBnClickedBtnAnd)
|
|
68 |
ON_BN_CLICKED(IDC_BUTTON_OR, &CMyDlgBarFuncKey::OnBnClickedBtnOr)
|
|
69 |
ON_BN_CLICKED(IDC_BUTTON_VLINE, &CMyDlgBarFuncKey::OnBnClickedBtnVline)
|
|
70 |
ON_BN_CLICKED(IDC_BUTTON_OUT, &CMyDlgBarFuncKey::OnBnClickedBtnOut)
|
|
71 |
ON_BN_CLICKED(IDC_BUTTON_TMCT, &CMyDlgBarFuncKey::OnBnClickedBtnTmCt)
|
|
72 |
ON_BN_CLICKED(IDC_BUTTON_FUN, &CMyDlgBarFuncKey::OnBnClickedBtnFun)
|
|
73 |
ON_BN_CLICKED(IDC_BUTTON_HLINE, &CMyDlgBarFuncKey::OnBnClickedBtnHLine)
|
|
74 |
ON_BN_CLICKED(IDC_BUTTON_NOT, &CMyDlgBarFuncKey::OnBnClickedBtnNot)
|
|
75 |
ON_BN_CLICKED(IDC_BUTTON_INDEX, &CMyDlgBarFuncKey::OnBnClickedBtnIndex)
|
|
76 |
ON_BN_CLICKED(IDC_BUTTON_MC, &CMyDlgBarFuncKey::OnBnClickedBtnMc)
|
|
77 |
ON_BN_CLICKED(IDC_BUTTON_MCE, &CMyDlgBarFuncKey::OnBnClickedBtnMce)
|
|
78 |
|
|
79 |
ON_BN_CLICKED(IDC_BUTTON_SET, &CMyDlgBarFuncKey::OnBnClickedBtnSet)
|
|
80 |
ON_BN_CLICKED(IDC_BUTTON_RESET, &CMyDlgBarFuncKey::OnBnClickedBtnReset)
|
|
81 |
ON_BN_CLICKED(IDC_BUTTON_DF, &CMyDlgBarFuncKey::OnBnClickedBtnDf)
|
|
82 |
ON_BN_CLICKED(IDC_BUTTON_END, &CMyDlgBarFuncKey::OnBnClickedBtnEnd)
|
|
83 |
ON_BN_CLICKED(IDC_BUTTON_COMPARE, &CMyDlgBarFuncKey::OnBnClickedBtnCompare)
|
|
84 |
ON_BN_CLICKED(IDC_BUTTON_PFUN, &CMyDlgBarFuncKey::OnBnClickedBtnPFun)
|
|
85 |
ON_BN_CLICKED(IDC_BUTTON_UPDOWN, &CMyDlgBarFuncKey::OnBnClickedBtnUpDown)
|
|
86 |
ON_BN_CLICKED(IDC_BUTTON_BIT, &CMyDlgBarFuncKey::OnBnClickedBtnBit)
|
|
87 |
ON_BN_CLICKED(IDC_BUTTON_WORD, &CMyDlgBarFuncKey::OnBnClickedBtnWord)
|
|
88 |
ON_BN_CLICKED(IDC_BUTTON_INSTRUCTION1, &CMyDlgBarFuncKey::OnBnClickedBtnInc1)
|
|
89 |
ON_BN_CLICKED(IDC_BUTTON_INSTRUCTION2, &CMyDlgBarFuncKey::OnBnClickedBtnInc2)
|
|
90 |
|
|
91 |
ON_BN_CLICKED(IDC_BUTTON_PGCONVERT, &CMyDlgBarFuncKey::OnBnClickedBtnPgConvert)
|
|
92 |
ON_BN_CLICKED(IDC_BUTTON_ONLINE, &CMyDlgBarFuncKey::OnBnClickedBtnOnline)
|
|
93 |
ON_BN_CLICKED(IDC_BUTTON_OFFLINE, &CMyDlgBarFuncKey::OnBnClickedBtnOffline)
|
|
94 |
ON_BN_CLICKED(IDC_BUTTON_COLSE, &CMyDlgBarFuncKey::OnBnClickedBtnClose)
|
|
95 |
ON_BN_CLICKED(IDC_BUTTON_FIND, &CMyDlgBarFuncKey::OnBnClickedBtnFind)
|
|
96 |
ON_BN_CLICKED(IDC_BUTTON_NEXTWIN, &CMyDlgBarFuncKey::OnBnClickedBtnNextWin)
|
|
97 |
ON_BN_CLICKED(IDC_BUTTON_MONITOR, &CMyDlgBarFuncKey::OnBnClickedBtnMonitor)
|
|
98 |
ON_BN_CLICKED(IDC_BUTTON_STATUS, &CMyDlgBarFuncKey::OnBnClickedBtnStatus)
|
|
99 |
ON_BN_CLICKED(IDC_BUTTON_RUNPROG, &CMyDlgBarFuncKey::OnBnClickedBtnRunProg)
|
|
100 |
ON_BN_CLICKED(IDC_BUTTON_PLCREAD, &CMyDlgBarFuncKey::OnBnClickedBtnPlcRead)
|
|
101 |
ON_BN_CLICKED(IDC_BUTTON_PLCWRITE, &CMyDlgBarFuncKey::OnBnClickedBtnPlcWrite)
|
|
102 |
|
|
103 |
ON_BN_CLICKED(IDC_BUTTON_X, &CMyDlgBarFuncKey::OnBnClickedBtnX)
|
|
104 |
ON_BN_CLICKED(IDC_BUTTON_Y, &CMyDlgBarFuncKey::OnBnClickedBtnY)
|
|
105 |
ON_BN_CLICKED(IDC_BUTTON_R, &CMyDlgBarFuncKey::OnBnClickedBtnR)
|
|
106 |
ON_BN_CLICKED(IDC_BUTTON_L, &CMyDlgBarFuncKey::OnBnClickedBtnL)
|
|
107 |
ON_BN_CLICKED(IDC_BUTTON_P, &CMyDlgBarFuncKey::OnBnClickedBtnP)
|
|
108 |
ON_BN_CLICKED(IDC_BUTTON_COMPARE1, &CMyDlgBarFuncKey::OnBnClickedBtnCompare1)
|
|
109 |
ON_BN_CLICKED(IDC_BUTTON_NOT1, &CMyDlgBarFuncKey::OnBnClickedBtnNot)
|
|
110 |
ON_BN_CLICKED(IDC_BUTTON_T, &CMyDlgBarFuncKey::OnBnClickedBtnT)
|
|
111 |
ON_BN_CLICKED(IDC_BUTTON_C, &CMyDlgBarFuncKey::OnBnClickedBtnC)
|
|
112 |
ON_BN_CLICKED(IDC_BUTTON_E, &CMyDlgBarFuncKey::OnBnClickedBtnE)
|
|
113 |
ON_BN_CLICKED(IDC_BUTTON_UPDOWN1, &CMyDlgBarFuncKey::OnBnClickedBtnUpDown)
|
|
114 |
|
|
115 |
ON_BN_CLICKED(IDC_BUTTON_TMX, &CMyDlgBarFuncKey::OnBnClickedBtnTmx)
|
|
116 |
ON_BN_CLICKED(IDC_BUTTON_TMY, &CMyDlgBarFuncKey::OnBnClickedBtnTmy)
|
|
117 |
ON_BN_CLICKED(IDC_BUTTON_TMR, &CMyDlgBarFuncKey::OnBnClickedBtnTmr)
|
|
118 |
ON_BN_CLICKED(IDC_BUTTON_TML, &CMyDlgBarFuncKey::OnBnClickedBtnTml)
|
|
119 |
ON_BN_CLICKED(IDC_BUTTON_CT, &CMyDlgBarFuncKey::OnBnClickedBtnCt)
|
|
120 |
|
|
121 |
ON_BN_CLICKED(IDC_BUTTON_D, &CMyDlgBarFuncKey::OnBnClickedBtnD)
|
|
122 |
ON_BN_CLICKED(IDC_BUTTON_F, &CMyDlgBarFuncKey::OnBnClickedBtnF)
|
|
123 |
ON_BN_CLICKED(IDC_BUTTON_NEQ, &CMyDlgBarFuncKey::OnBnClickedBtnNEQ)
|
|
124 |
ON_BN_CLICKED(IDC_BUTTON_GT, &CMyDlgBarFuncKey::OnBnClickedBtnGT)
|
|
125 |
ON_BN_CLICKED(IDC_BUTTON_LT, &CMyDlgBarFuncKey::OnBnClickedBtnLT)
|
|
126 |
|
|
127 |
END_MESSAGE_MAP()
|
|
128 |
|
|
129 |
|
|
130 |
// CMyDlgBarFuncKey 消息处理程序
|
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
LRESULT CMyDlgBarFuncKey::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
|
135 |
{
|
|
136 |
// TODO: 在此处添加实现代码.
|
|
137 |
//CDialogBar::OnInitDialog();
|
|
138 |
// TODO: Add extra initialization here
|
|
139 |
CString(s1);
|
|
140 |
|
|
141 |
s1.Format(_T(" MyDlgBarFuncKey OnInitDialog "));
|
|
142 |
SysLog(s1);
|
|
143 |
|
|
144 |
LRESULT bRet = HandleInitDialog(wParam, lParam);
|
|
145 |
if (!UpdateData(FALSE))
|
|
146 |
{
|
|
147 |
TRACE("InitDialogBar Failed!");
|
|
148 |
}
|
|
149 |
|
|
150 |
CRect rect0;
|
|
151 |
GetClientRect(&rect0);
|
|
152 |
int nWidth = rect0.Width();
|
|
153 |
int nHeight = rect0.Height();
|
|
154 |
int nLeftMargin = 48;
|
|
155 |
int nSpace = nWidth - nLeftMargin;
|
|
156 |
int x1, y1, x2, y2;
|
|
157 |
CRect rect1(0, 0, 100, 10);
|
|
158 |
// font1.CreatePointFont(95, _T("楷体"));
|
|
159 |
for (int i = 0; i < m_Lines; i++) {
|
|
160 |
for (int j = 0; j < 11; j++) {
|
|
161 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
162 |
y1 = i * nHeight / 3;
|
|
163 |
x2 = x1 + nSpace / 11;
|
|
164 |
y2 = y1 + nHeight / 3;
|
|
165 |
rect1.SetRect(x1, y1, x2, y2);
|
|
166 |
m_buttons[0][i][j].Create(myButtons[0][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | WS_VISIBLE | BS_PUSHBUTTON, rect1, this, myButtons[0][i][j].nID);
|
|
167 |
// init;
|
|
168 |
}
|
|
169 |
}
|
|
170 |
for (int i = 0; i < m_Lines; i++) {
|
|
171 |
for (int j = 0; j < 11; j++) {
|
|
172 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
173 |
y1 = i * nHeight / 3;
|
|
174 |
x2 = x1 + nSpace / 11;
|
|
175 |
y2 = y1 + nHeight / 3;
|
|
176 |
rect1.SetRect(x1, y1, x2, y2);
|
|
177 |
m_buttons[1][i][j].Create(myButtons[1][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON, rect1, this, myButtons[1][i][j].nID);
|
|
178 |
// bit;
|
|
179 |
}
|
|
180 |
}
|
|
181 |
for (int i = 0; i < m_Lines; i++) {
|
|
182 |
for (int j = 0; j < 11; j++) {
|
|
183 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
184 |
y1 = i * nHeight / 3;
|
|
185 |
x2 = x1 + nSpace / 11;
|
|
186 |
y2 = y1 + nHeight / 3;
|
|
187 |
rect1.SetRect(x1, y1, x2, y2);
|
|
188 |
m_buttons[2][i][j].Create(myButtons[2][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON, rect1, this, myButtons[2][i][j].nID);
|
|
189 |
// compare;
|
|
190 |
}
|
|
191 |
}
|
|
192 |
for (int i = 0; i < m_Lines; i++) {
|
|
193 |
for (int j = 0; j < 11; j++) {
|
|
194 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
195 |
y1 = i * nHeight / 3;
|
|
196 |
x2 = x1 + nSpace / 11;
|
|
197 |
y2 = y1 + nHeight / 3;
|
|
198 |
rect1.SetRect(x1, y1, x2, y2);
|
|
199 |
m_buttons[3][i][j].Create(myButtons[3][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON, rect1, this, myButtons[3][i][j].nID);
|
|
200 |
// word;
|
|
201 |
}
|
|
202 |
}
|
|
203 |
for (int i = 0; i < m_Lines; i++) {
|
|
204 |
for (int j = 0; j < 11; j++) {
|
|
205 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
206 |
y1 = i * nHeight / 3;
|
|
207 |
x2 = x1 + nSpace / 11;
|
|
208 |
y2 = y1 + nHeight / 3;
|
|
209 |
rect1.SetRect(x1, y1, x2, y2);
|
|
210 |
m_buttons[4][i][j].Create(myButtons[4][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON, rect1, this, myButtons[4][i][j].nID);
|
|
211 |
// index;
|
|
212 |
}
|
|
213 |
}
|
|
214 |
for (int i = 0; i < m_Lines; i++) {
|
|
215 |
for (int j = 0; j < 11; j++) {
|
|
216 |
x1 = nLeftMargin + j * nSpace / 11;
|
|
217 |
y1 = i * nHeight / 3;
|
|
218 |
x2 = x1 + nSpace / 11;
|
|
219 |
y2 = y1 + nHeight / 3;
|
|
220 |
rect1.SetRect(x1, y1, x2, y2);
|
|
221 |
m_buttons[5][i][j].Create(myButtons[5][i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | BS_PUSHBUTTON, rect1, this, myButtons[5][i][j].nID);
|
|
222 |
// TMCT;
|
|
223 |
}
|
|
224 |
}
|
|
225 |
|
|
226 |
return bRet; // return TRUE unless you set the focus to a control
|
|
227 |
// EXCEPTION: OCX Property Pages should return FALSE
|
|
228 |
return false;
|
|
229 |
}
|
|
230 |
|
|
231 |
|
|
232 |
|
|
233 |
|
|
234 |
BOOL CMyDlgBarFuncKey::Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
|
|
235 |
{
|
|
236 |
// TODO: 在此添加专用代码和/或调用基类
|
|
237 |
BOOL bRes = CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID);
|
|
238 |
// OnInitDialog(0,0);
|
|
239 |
return bRes;
|
|
240 |
//
|
|
241 |
// return CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID);
|
|
242 |
}
|
|
243 |
|
|
244 |
|
|
245 |
void CMyDlgBarFuncKey::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHandler)
|
|
246 |
{
|
|
247 |
// TODO: 在此添加专用代码和/或调用基类
|
|
248 |
CDialogBar::OnUpdateCmdUI(pTarget, FALSE);
|
|
249 |
}
|
|
250 |
|
|
251 |
|
|
252 |
void CMyDlgBarFuncKey::OnBnClickedButton1()
|
|
253 |
{
|
|
254 |
// TODO: 在此添加控件通知处理程序代码
|
|
255 |
CString s1;
|
|
256 |
s1.Format(_T("Button1 Clicked"));
|
|
257 |
SysLog(s1);
|
|
258 |
}
|
|
259 |
|
|
260 |
|
|
261 |
|
|
262 |
|
|
263 |
void CMyDlgBarFuncKey::SetBtnDisplayESC()
|
|
264 |
{
|
|
265 |
switch (current_btn_window)
|
|
266 |
{
|
|
267 |
case 1:
|
|
268 |
for (int i = 0;i < 3;i++) {
|
|
269 |
for (int j = 0;j < 11;j++) {
|
|
270 |
m_buttons[1][i][j].ShowWindow(SW_HIDE);
|
|
271 |
}
|
|
272 |
}
|
|
273 |
for (int i = 0;i < 3;i++) {
|
|
274 |
for (int j = 0;j < 11;j++) {
|
|
275 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
276 |
}
|
|
277 |
}
|
|
278 |
break;
|
|
279 |
case 2:
|
|
280 |
for (int i = 0;i < 3;i++) {
|
|
281 |
for (int j = 0;j < 11;j++) {
|
|
282 |
m_buttons[2][i][j].ShowWindow(SW_HIDE);
|
|
283 |
}
|
|
284 |
}
|
|
285 |
for (int i = 0;i < 3;i++) {
|
|
286 |
for (int j = 0;j < 11;j++) {
|
|
287 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
288 |
}
|
|
289 |
}
|
|
290 |
break;
|
|
291 |
case 3:
|
|
292 |
for (int i = 0;i < 3;i++) {
|
|
293 |
for (int j = 0;j < 11;j++) {
|
|
294 |
m_buttons[3][i][j].ShowWindow(SW_HIDE);
|
|
295 |
}
|
|
296 |
}
|
|
297 |
for (int i = 0;i < 3;i++) {
|
|
298 |
for (int j = 0;j < 11;j++) {
|
|
299 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
300 |
}
|
|
301 |
}
|
|
302 |
break;
|
|
303 |
case 4:
|
|
304 |
for (int i = 0;i < 3;i++) {
|
|
305 |
for (int j = 0;j < 11;j++) {
|
|
306 |
m_buttons[4][i][j].ShowWindow(SW_HIDE);
|
|
307 |
}
|
|
308 |
}
|
|
309 |
for (int i = 0;i < 3;i++) {
|
|
310 |
for (int j = 0;j < 11;j++) {
|
|
311 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
312 |
}
|
|
313 |
}
|
|
314 |
break;
|
|
315 |
case 5:
|
|
316 |
for (int i = 0;i < 3;i++) {
|
|
317 |
for (int j = 0;j < 11;j++) {
|
|
318 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
319 |
}
|
|
320 |
}
|
|
321 |
for (int i = 0;i < 3;i++) {
|
|
322 |
for (int j = 0;j < 11;j++) {
|
|
323 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
324 |
}
|
|
325 |
}
|
|
326 |
break;
|
|
327 |
default:
|
|
328 |
break;
|
|
329 |
}
|
|
330 |
|
|
331 |
}
|
|
332 |
|
|
333 |
void CMyDlgBarFuncKey::OnBnClickedBtnAnd()
|
|
334 |
{
|
|
335 |
|
|
336 |
|
|
337 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
338 |
p1->GetInputInfo(0x00010001);
|
|
339 |
|
|
340 |
|
|
341 |
//CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
342 |
//p1->GetInputInfo(_T("X"));
|
|
343 |
for (int i = 0;i < 3;i++){
|
|
344 |
for (int j = 0;j < 11;j++) {
|
|
345 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
346 |
}
|
|
347 |
}
|
|
348 |
|
|
349 |
for (int i = 0;i < 3;i++) {
|
|
350 |
for (int j = 0;j < 11;j++) {
|
|
351 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
352 |
}
|
|
353 |
}
|
|
354 |
current_btn_window = 1;
|
|
355 |
}
|
|
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
|
360 |
void CMyDlgBarFuncKey::OnBnClickedBtnOr()
|
|
361 |
{
|
|
362 |
|
|
363 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
364 |
p1->GetInputInfo(0x00010002);
|
|
365 |
|
|
366 |
for (int i = 0;i < 3;i++) {
|
|
367 |
for (int j = 0;j < 11;j++) {
|
|
368 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
369 |
}
|
|
370 |
}
|
|
371 |
|
|
372 |
for (int i = 0;i < 3;i++) {
|
|
373 |
for (int j = 0;j < 11;j++) {
|
|
374 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
375 |
}
|
|
376 |
}
|
|
377 |
current_btn_window = 1;
|
|
378 |
}
|
|
379 |
|
ad1b4b
|
380 |
/// <summary>
|
Z |
381 |
/// 横线
|
|
382 |
/// </summary>
|
418cb3
|
383 |
void CMyDlgBarFuncKey::OnBnClickedBtnVline()
|
Q |
384 |
{
|
|
385 |
|
|
386 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
ad1b4b
|
387 |
//p1->GetInputInfo(_T("——"));
|
418cb3
|
388 |
}
|
Q |
389 |
void CMyDlgBarFuncKey::OnBnClickedBtnOut()
|
|
390 |
{
|
|
391 |
|
|
392 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
393 |
p1->GetInputInfo(0x00010003);
|
|
394 |
for (int i = 0;i < 3;i++) {
|
|
395 |
for (int j = 0;j < 11;j++) {
|
|
396 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
397 |
}
|
|
398 |
}
|
|
399 |
|
|
400 |
for (int i = 0;i < 3;i++) {
|
|
401 |
for (int j = 0;j < 11;j++) {
|
|
402 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
403 |
}
|
|
404 |
}
|
|
405 |
current_btn_window = 1;
|
|
406 |
}
|
|
407 |
void CMyDlgBarFuncKey::OnBnClickedBtnTmCt()
|
|
408 |
{
|
|
409 |
|
|
410 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
411 |
p1->GetInputInfo(0x0001000b);
|
|
412 |
for (int i = 0;i < 3;i++) {
|
|
413 |
for (int j = 0;j < 11;j++) {
|
|
414 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
415 |
}
|
|
416 |
}
|
|
417 |
|
|
418 |
for (int i = 0;i < 3;i++) {
|
|
419 |
for (int j = 0;j < 11;j++) {
|
|
420 |
m_buttons[5][i][j].ShowWindow(SW_SHOW);
|
|
421 |
}
|
|
422 |
}
|
|
423 |
current_btn_window = 5;
|
|
424 |
}
|
|
425 |
void CMyDlgBarFuncKey::OnBnClickedBtnFun()
|
|
426 |
{
|
|
427 |
|
|
428 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
429 |
//p1->GetInputInfo(_T("Fun "));
|
|
430 |
}
|
ad1b4b
|
431 |
|
Z |
432 |
/// <summary>
|
|
433 |
/// 竖线
|
|
434 |
/// </summary>
|
418cb3
|
435 |
void CMyDlgBarFuncKey::OnBnClickedBtnHLine()
|
Q |
436 |
{
|
|
437 |
|
|
438 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
ad1b4b
|
439 |
//p1->GetInputInfo(_T("|"));
|
418cb3
|
440 |
}
|
Q |
441 |
void CMyDlgBarFuncKey::OnBnClickedBtnNot() /****************************************************************************/
|
|
442 |
{
|
|
443 |
|
|
444 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
445 |
p1->GetInputInfo(0x00010013);
|
|
446 |
for (int i = 0;i < 3;i++) {
|
|
447 |
for (int j = 0;j < 11;j++) {
|
|
448 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
449 |
}
|
|
450 |
}
|
|
451 |
|
|
452 |
for (int i = 0;i < 3;i++) {
|
|
453 |
for (int j = 0;j < 11;j++) {
|
|
454 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
455 |
}
|
|
456 |
}
|
|
457 |
current_btn_window = 1;
|
|
458 |
}
|
|
459 |
void CMyDlgBarFuncKey::OnBnClickedBtnIndex()
|
|
460 |
{
|
|
461 |
|
|
462 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
463 |
//p1->GetInputInfo(_T("Index "));
|
|
464 |
for (int i = 0;i < 3;i++) {
|
|
465 |
for (int j = 0;j < 11;j++) {
|
|
466 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
467 |
}
|
|
468 |
}
|
|
469 |
|
|
470 |
for (int i = 0;i < 3;i++) {
|
|
471 |
for (int j = 0;j < 11;j++) {
|
|
472 |
m_buttons[4][i][j].ShowWindow(SW_SHOW);
|
|
473 |
}
|
|
474 |
}
|
|
475 |
current_btn_window = 4;
|
|
476 |
}
|
|
477 |
void CMyDlgBarFuncKey::OnBnClickedBtnMc()
|
|
478 |
{
|
|
479 |
|
|
480 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
481 |
p1->GetInputInfo(0x00010004);
|
|
482 |
}
|
|
483 |
void CMyDlgBarFuncKey::OnBnClickedBtnMce()
|
|
484 |
{
|
|
485 |
|
|
486 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
487 |
p1->GetInputInfo(0x00010005);
|
|
488 |
}
|
|
489 |
void CMyDlgBarFuncKey::OnBnClickedBtnSet()
|
|
490 |
{
|
|
491 |
|
|
492 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
493 |
p1->GetInputInfo(0x00010006);
|
|
494 |
for (int i = 0;i < 3;i++) {
|
|
495 |
for (int j = 0;j < 11;j++) {
|
|
496 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
497 |
}
|
|
498 |
}
|
|
499 |
|
|
500 |
for (int i = 0;i < 3;i++) {
|
|
501 |
for (int j = 0;j < 11;j++) {
|
|
502 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
503 |
}
|
|
504 |
}
|
|
505 |
current_btn_window = 1;
|
|
506 |
}
|
|
507 |
void CMyDlgBarFuncKey::OnBnClickedBtnReset()
|
|
508 |
{
|
|
509 |
|
|
510 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
511 |
p1->GetInputInfo(0x00010007);
|
|
512 |
for (int i = 0;i < 3;i++) {
|
|
513 |
for (int j = 0;j < 11;j++) {
|
|
514 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
515 |
}
|
|
516 |
}
|
|
517 |
|
|
518 |
for (int i = 0;i < 3;i++) {
|
|
519 |
for (int j = 0;j < 11;j++) {
|
|
520 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
521 |
}
|
|
522 |
}
|
|
523 |
current_btn_window = 1;
|
|
524 |
}
|
|
525 |
void CMyDlgBarFuncKey::OnBnClickedBtnDf()
|
|
526 |
{
|
|
527 |
|
|
528 |
|
|
529 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
530 |
p1->GetInputInfo(0x00010008);
|
|
531 |
|
|
532 |
//p1->GetInputInfo(_T("(DF)"));
|
|
533 |
}
|
|
534 |
void CMyDlgBarFuncKey::OnBnClickedBtnEnd()
|
|
535 |
{
|
|
536 |
|
|
537 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
538 |
p1->GetInputInfo(0x0001000A);
|
|
539 |
}
|
|
540 |
void CMyDlgBarFuncKey::OnBnClickedBtnCompare()
|
|
541 |
{
|
|
542 |
|
|
543 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
544 |
//p1->GetInputInfo(_T("Compare"));
|
|
545 |
for (int i = 0;i < 3;i++) {
|
|
546 |
for (int j = 0;j < 11;j++) {
|
|
547 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
548 |
}
|
|
549 |
}
|
|
550 |
|
|
551 |
for (int i = 0;i < 3;i++) {
|
|
552 |
for (int j = 0;j < 11;j++) {
|
|
553 |
m_buttons[2][i][j].ShowWindow(SW_SHOW);
|
|
554 |
}
|
|
555 |
}
|
|
556 |
current_btn_window = 2;
|
|
557 |
}
|
|
558 |
void CMyDlgBarFuncKey::OnBnClickedBtnPFun()
|
|
559 |
{
|
|
560 |
|
|
561 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
562 |
//p1->GetInputInfo(_T("PFun"));
|
|
563 |
}
|
|
564 |
void CMyDlgBarFuncKey::OnBnClickedBtnUpDown()
|
|
565 |
{
|
|
566 |
|
|
567 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
568 |
p1->GetInputInfo(0x00010010);
|
|
569 |
|
|
570 |
|
|
571 |
|
|
572 |
for (int i = 0;i < 3;i++) {
|
|
573 |
for (int j = 0;j < 11;j++) {
|
|
574 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
575 |
}
|
|
576 |
}
|
|
577 |
|
|
578 |
for (int i = 0;i < 3;i++) {
|
|
579 |
for (int j = 0;j < 11;j++) {
|
|
580 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
581 |
}
|
|
582 |
}
|
|
583 |
current_btn_window = 1;
|
|
584 |
}
|
|
585 |
void CMyDlgBarFuncKey::OnBnClickedBtnBit()
|
|
586 |
{
|
|
587 |
|
|
588 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
589 |
//p1->GetInputInfo(_T("Bit"));
|
|
590 |
for (int i = 0;i < 3;i++) {
|
|
591 |
for (int j = 0;j < 11;j++) {
|
|
592 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
593 |
}
|
|
594 |
}
|
|
595 |
|
|
596 |
for (int i = 0;i < 3;i++) {
|
|
597 |
for (int j = 0;j < 11;j++) {
|
|
598 |
m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
|
599 |
}
|
|
600 |
}
|
|
601 |
current_btn_window = 1;
|
|
602 |
}
|
|
603 |
void CMyDlgBarFuncKey::OnBnClickedBtnWord()
|
|
604 |
{
|
|
605 |
|
|
606 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
607 |
//p1->GetInputInfo(_T("Word"));
|
|
608 |
for (int i = 0;i < 3;i++) {
|
|
609 |
for (int j = 0;j < 11;j++) {
|
|
610 |
m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
|
611 |
}
|
|
612 |
}
|
|
613 |
|
|
614 |
for (int i = 0;i < 3;i++) {
|
|
615 |
for (int j = 0;j < 11;j++) {
|
|
616 |
m_buttons[3][i][j].ShowWindow(SW_SHOW);
|
|
617 |
}
|
|
618 |
}
|
|
619 |
current_btn_window = 3;
|
|
620 |
}
|
|
621 |
void CMyDlgBarFuncKey::OnBnClickedBtnInc1()
|
|
622 |
{
|
|
623 |
|
|
624 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
625 |
//p1->GetInputInfo(_T("Inc1"));
|
|
626 |
}
|
|
627 |
void CMyDlgBarFuncKey::OnBnClickedBtnInc2()
|
|
628 |
{
|
|
629 |
|
|
630 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
631 |
//p1->GetInputInfo(_T("Inc2"));
|
|
632 |
}
|
|
633 |
|
|
634 |
|
|
635 |
void CMyDlgBarFuncKey::OnBnClickedBtnPgConvert()
|
|
636 |
{
|
|
637 |
|
|
638 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
639 |
//p1->GetInputInfo(_T("PgConvert"));
|
|
640 |
}
|
|
641 |
void CMyDlgBarFuncKey::OnBnClickedBtnOnline()
|
|
642 |
{
|
|
643 |
|
|
644 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
645 |
//p1->GetInputInfo(_T("Online"));
|
|
646 |
}
|
|
647 |
void CMyDlgBarFuncKey::OnBnClickedBtnOffline()
|
|
648 |
{
|
|
649 |
|
|
650 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
651 |
//p1->GetInputInfo(_T("Offline"));
|
|
652 |
}
|
|
653 |
void CMyDlgBarFuncKey::OnBnClickedBtnClose()
|
|
654 |
{
|
|
655 |
|
|
656 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
657 |
//p1->GetInputInfo(_T("Close"));
|
|
658 |
}
|
|
659 |
void CMyDlgBarFuncKey::OnBnClickedBtnFind()
|
|
660 |
{
|
|
661 |
|
|
662 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
663 |
//p1->GetInputInfo(_T("Find"));
|
|
664 |
}
|
|
665 |
void CMyDlgBarFuncKey::OnBnClickedBtnNextWin()
|
|
666 |
{
|
|
667 |
|
|
668 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
669 |
//p1->GetInputInfo(_T("NextWin"));
|
|
670 |
}
|
|
671 |
void CMyDlgBarFuncKey::OnBnClickedBtnMonitor()
|
|
672 |
{
|
|
673 |
|
|
674 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
675 |
//p1->GetInputInfo(_T("Monitor"));
|
|
676 |
}
|
|
677 |
void CMyDlgBarFuncKey::OnBnClickedBtnStatus()
|
|
678 |
{
|
|
679 |
|
|
680 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
681 |
//p1->GetInputInfo(_T("Status"));
|
|
682 |
}
|
|
683 |
void CMyDlgBarFuncKey::OnBnClickedBtnRunProg()
|
|
684 |
{
|
|
685 |
|
|
686 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
687 |
//p1->GetInputInfo(_T("RunProg"));
|
|
688 |
}
|
|
689 |
void CMyDlgBarFuncKey::OnBnClickedBtnPlcRead()
|
|
690 |
{
|
|
691 |
|
|
692 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
693 |
//p1->GetInputInfo(_T("PlcRead"));
|
|
694 |
}
|
|
695 |
void CMyDlgBarFuncKey::OnBnClickedBtnPlcWrite()
|
|
696 |
{
|
|
697 |
|
|
698 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
699 |
//p1->GetInputInfo(_T("PlcWrite"));
|
|
700 |
}
|
|
701 |
|
|
702 |
|
|
703 |
void CMyDlgBarFuncKey::OnBnClickedBtnX()
|
|
704 |
{
|
|
705 |
|
|
706 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
707 |
p1->GetInputInfo(0x00020001);
|
|
708 |
}
|
|
709 |
void CMyDlgBarFuncKey::OnBnClickedBtnY()
|
|
710 |
{
|
|
711 |
|
|
712 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
713 |
p1->GetInputInfo(0x00020002);
|
|
714 |
}
|
|
715 |
void CMyDlgBarFuncKey::OnBnClickedBtnR()
|
|
716 |
{
|
|
717 |
|
|
718 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
719 |
p1->GetInputInfo(0x00020003);
|
|
720 |
}
|
|
721 |
void CMyDlgBarFuncKey::OnBnClickedBtnL()
|
|
722 |
{
|
|
723 |
|
|
724 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
725 |
p1->GetInputInfo(0x00020004);
|
|
726 |
}
|
|
727 |
void CMyDlgBarFuncKey::OnBnClickedBtnP()
|
|
728 |
{
|
|
729 |
|
|
730 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
731 |
p1->GetInputInfo(0x00020005);
|
|
732 |
}
|
|
733 |
|
|
734 |
void CMyDlgBarFuncKey::OnBnClickedBtnCompare1()
|
|
735 |
{
|
|
736 |
for (int i = 0;i < 3;i++) {
|
|
737 |
for (int j = 0;j < 11;j++) {
|
|
738 |
m_buttons[1][i][j].ShowWindow(SW_HIDE);
|
|
739 |
}
|
|
740 |
}
|
|
741 |
for (int i = 0;i < 3;i++) {
|
|
742 |
for (int j = 0;j < 11;j++) {
|
|
743 |
m_buttons[2][i][j].ShowWindow(SW_SHOW);
|
|
744 |
}
|
|
745 |
}
|
|
746 |
current_btn_window = 2;
|
|
747 |
}
|
|
748 |
void CMyDlgBarFuncKey::OnBnClickedBtnT()
|
|
749 |
{
|
|
750 |
|
|
751 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
752 |
p1->GetInputInfo(0x00020006);
|
|
753 |
}
|
|
754 |
void CMyDlgBarFuncKey::OnBnClickedBtnC()
|
|
755 |
{
|
|
756 |
|
|
757 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
758 |
p1->GetInputInfo(0x00020007);
|
|
759 |
}
|
|
760 |
void CMyDlgBarFuncKey::OnBnClickedBtnE()
|
|
761 |
{
|
|
762 |
|
|
763 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
764 |
p1->GetInputInfo(0x00020008);
|
|
765 |
}
|
|
766 |
|
|
767 |
|
|
768 |
void CMyDlgBarFuncKey::OnBnClickedBtnTmx()
|
|
769 |
{
|
|
770 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
771 |
p1->GetInputInfo(0x00020009);
|
|
772 |
for (int i = 0;i < 3;i++) {
|
|
773 |
for (int j = 0;j < 11;j++) {
|
|
774 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
775 |
}
|
|
776 |
}
|
|
777 |
for (int i = 0;i < 3;i++) {
|
|
778 |
for (int j = 0;j < 11;j++) {
|
|
779 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
780 |
}
|
|
781 |
}
|
|
782 |
current_btn_window = 0;
|
|
783 |
}
|
|
784 |
void CMyDlgBarFuncKey::OnBnClickedBtnTmy()
|
|
785 |
{
|
|
786 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
787 |
p1->GetInputInfo(0x0002000A);
|
|
788 |
for (int i = 0;i < 3;i++) {
|
|
789 |
for (int j = 0;j < 11;j++) {
|
|
790 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
791 |
}
|
|
792 |
}
|
|
793 |
for (int i = 0;i < 3;i++) {
|
|
794 |
for (int j = 0;j < 11;j++) {
|
|
795 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
796 |
}
|
|
797 |
}
|
|
798 |
current_btn_window = 0;
|
|
799 |
}
|
|
800 |
void CMyDlgBarFuncKey::OnBnClickedBtnTmr()
|
|
801 |
{
|
|
802 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
803 |
p1->GetInputInfo(0x0002000B);
|
|
804 |
for (int i = 0;i < 3;i++) {
|
|
805 |
for (int j = 0;j < 11;j++) {
|
|
806 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
807 |
}
|
|
808 |
}
|
|
809 |
for (int i = 0;i < 3;i++) {
|
|
810 |
for (int j = 0;j < 11;j++) {
|
|
811 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
812 |
}
|
|
813 |
}
|
|
814 |
current_btn_window = 0;
|
|
815 |
}
|
|
816 |
void CMyDlgBarFuncKey::OnBnClickedBtnTml()
|
|
817 |
{
|
|
818 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
819 |
p1->GetInputInfo(0x0002000C);
|
|
820 |
for (int i = 0;i < 3;i++) {
|
|
821 |
for (int j = 0;j < 11;j++) {
|
|
822 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
823 |
}
|
|
824 |
}
|
|
825 |
for (int i = 0;i < 3;i++) {
|
|
826 |
for (int j = 0;j < 11;j++) {
|
|
827 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
828 |
}
|
|
829 |
}
|
|
830 |
current_btn_window = 0;
|
|
831 |
}
|
|
832 |
void CMyDlgBarFuncKey::OnBnClickedBtnCt()
|
|
833 |
{
|
|
834 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
835 |
p1->GetInputInfo(0x0002000D);
|
|
836 |
for (int i = 0;i < 3;i++) {
|
|
837 |
for (int j = 0;j < 11;j++) {
|
|
838 |
m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
|
839 |
}
|
|
840 |
}
|
|
841 |
for (int i = 0;i < 3;i++) {
|
|
842 |
for (int j = 0;j < 11;j++) {
|
|
843 |
m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
|
844 |
}
|
|
845 |
}
|
|
846 |
current_btn_window = 0;
|
|
847 |
}
|
|
848 |
|
|
849 |
|
|
850 |
void CMyDlgBarFuncKey::OnBnClickedBtnD()
|
|
851 |
{
|
|
852 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
853 |
p1->GetInputInfo(0x00010015);
|
|
854 |
}
|
|
855 |
void CMyDlgBarFuncKey::OnBnClickedBtnF()
|
|
856 |
{
|
|
857 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
858 |
p1->GetInputInfo(0x00010016);
|
|
859 |
}
|
|
860 |
void CMyDlgBarFuncKey::OnBnClickedBtnNEQ()
|
|
861 |
{
|
|
862 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
863 |
p1->GetInputInfo(0x0002000D);
|
|
864 |
|
|
865 |
}
|
|
866 |
|
|
867 |
void CMyDlgBarFuncKey::OnBnClickedBtnGT()
|
|
868 |
{
|
|
869 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
870 |
p1->GetInputInfo(0x0002000E);
|
|
871 |
}
|
|
872 |
void CMyDlgBarFuncKey::OnBnClickedBtnLT()
|
|
873 |
{
|
|
874 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
875 |
p1->GetInputInfo(0x0002000F);
|
|
876 |
|
|
877 |
} |