| | |
| | | #include "MyDlgBarFuncKey.h"
|
| | | #include "afxdialogex.h"
|
| | |
|
| | | #include "MainFrm.h"
|
| | |
|
| | |
|
| | | // CMyDlgBarFuncKey 对话框
|
| | | CMyDlgBarFuncKey::structButton myButtons[3][12] =
|
| | |
|
| | | CMyDlgBarFuncKey::structButton myButtons[6][3][11] =
|
| | | {
|
| | | {33101,_T("11"), 33102,_T("12") ,33103,_T("13"), 33104,_T("14") ,33105,_T("15") ,33106,_T("16") ,33107,_T("17") ,33108,_T("18") ,33109,_T("19") ,33110,_T("110") ,33111,_T("111"), 33112,_T("112") },
|
| | | {33201,_T("21"), 33202,_T("22") ,33203,_T("23"), 33204,_T("24") ,33205,_T("25") ,33206,_T("26") ,33207,_T("27") ,33208,_T("28") ,33209,_T("29") ,33210,_T("210") ,33211,_T("211"), 33212,_T("212") },
|
| | | {33301,_T("31"), 33302,_T("32") ,33303,_T("33"), 33304,_T("34") ,33305,_T("35") ,33306,_T("36") ,33307,_T("37") ,33308,_T("38") ,33309,_T("39") ,33310,_T("310") ,33311,_T("311"), 33312,_T("312") },
|
| | | {{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)") },
|
| | | {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") },
|
| | | {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写入") } },
|
| | |
|
| | | {{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("") },
|
| | | {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("") },
|
| | | {33601,_T(""), 33602,_T("") ,33603,_T(""), 33604,_T("") ,33605,_T("") ,33606,_T("") ,33607,_T("") ,33608,_T("") ,33609,_T("") ,33610,_T("") ,33611,_T("") }},
|
| | |
|
| | | {{33701,_T("D"), 33702,_T("F") ,33703,_T(""), 33704,_T("") ,33705,_T("") ,33706,_T("=") ,33707,_T(">") ,33708,_T("<") ,33709,_T("") ,33710,_T("") ,33711,_T("") },
|
| | | {33801,_T(""), 33802,_T("") ,33803,_T(""), 33804,_T("") ,33805,_T("") ,33806,_T("") ,33807,_T("") ,33808,_T("") ,33809,_T("") ,33810,_T("") ,33811,_T("") },
|
| | | {33901,_T(""), 33902,_T("") ,33903,_T(""), 33904,_T("") ,33905,_T("") ,33906,_T("") ,33907,_T("") ,33908,_T("") ,33909,_T("") ,33910,_T("") ,33911,_T("") }},
|
| | |
|
| | | {{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("") },
|
| | | {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("") },
|
| | | {34301,_T("PG转换"), 34302,_T("") ,34303,_T(""), 34304,_T("") ,34305,_T("") ,34306,_T("") ,34307,_T("") ,34308,_T("") ,34309,_T("") ,34310,_T("") ,34311,_T("") }},
|
| | |
|
| | | {{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("") },
|
| | | {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("") },
|
| | | {34601,_T(""), 34602,_T("") ,34603,_T(""), 34604,_T("") ,34605,_T("") ,34606,_T("") ,34607,_T("") ,34608,_T("") ,34609,_T("") ,34610,_T("") ,34611,_T("") }},
|
| | |
|
| | | {{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("") },
|
| | | {34801,_T(""), 34802,_T("") ,34803,_T(""), 34804,_T("") ,34805,_T("") ,34806,_T("") ,34807,_T("") ,34808,_T("") ,34809,_T("") ,34810,_T("") ,34811,_T("") },
|
| | | {34901,_T(""), 34902,_T("") ,34903,_T(""), 34904,_T("") ,34905,_T("") ,34906,_T("") ,34907,_T("") ,34908,_T("") ,34909,_T("") ,3490,_T("") ,34911,_T("") }},
|
| | | };
|
| | | static int myButtonCount = sizeof(myButtons) / sizeof(CMyDlgBarFuncKey::structButton);
|
| | |
|
| | | static int myButtonCount = sizeof(myButtons[6][3][11]) / sizeof(CMyDlgBarFuncKey::structButton);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | IMPLEMENT_DYNAMIC(CMyDlgBarFuncKey, CDialogBar)
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | |
|
| | | BEGIN_MESSAGE_MAP(CMyDlgBarFuncKey, CDialogBar)
|
| | | ON_MESSAGE(WM_INITDIALOG, CMyDlgBarFuncKey::OnInitDialog)
|
| | | ON_BN_CLICKED(IDC_BUTTON1, &CMyDlgBarFuncKey::OnBnClickedButton1)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_AND, &CMyDlgBarFuncKey::OnBnClickedBtnAnd) |
| | | ON_BN_CLICKED(IDC_BUTTON_OR, &CMyDlgBarFuncKey::OnBnClickedBtnOr)
|
| | | ON_BN_CLICKED(IDC_BUTTON_VLINE, &CMyDlgBarFuncKey::OnBnClickedBtnVline)
|
| | | ON_BN_CLICKED(IDC_BUTTON_OUT, &CMyDlgBarFuncKey::OnBnClickedBtnOut)
|
| | | ON_BN_CLICKED(IDC_BUTTON_TMCT, &CMyDlgBarFuncKey::OnBnClickedBtnTmCt) |
| | | ON_BN_CLICKED(IDC_BUTTON_FUN, &CMyDlgBarFuncKey::OnBnClickedBtnFun) |
| | | ON_BN_CLICKED(IDC_BUTTON_HLINE, &CMyDlgBarFuncKey::OnBnClickedBtnHLine)
|
| | | ON_BN_CLICKED(IDC_BUTTON_NOT, &CMyDlgBarFuncKey::OnBnClickedBtnNot)
|
| | | ON_BN_CLICKED(IDC_BUTTON_INDEX, &CMyDlgBarFuncKey::OnBnClickedBtnIndex)
|
| | | ON_BN_CLICKED(IDC_BUTTON_MC, &CMyDlgBarFuncKey::OnBnClickedBtnMc)
|
| | | ON_BN_CLICKED(IDC_BUTTON_MCE, &CMyDlgBarFuncKey::OnBnClickedBtnMce)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_SET, &CMyDlgBarFuncKey::OnBnClickedBtnSet)
|
| | | ON_BN_CLICKED(IDC_BUTTON_RESET, &CMyDlgBarFuncKey::OnBnClickedBtnReset)
|
| | | ON_BN_CLICKED(IDC_BUTTON_DF, &CMyDlgBarFuncKey::OnBnClickedBtnDf)
|
| | | ON_BN_CLICKED(IDC_BUTTON_END, &CMyDlgBarFuncKey::OnBnClickedBtnEnd)
|
| | | ON_BN_CLICKED(IDC_BUTTON_COMPARE, &CMyDlgBarFuncKey::OnBnClickedBtnCompare)
|
| | | ON_BN_CLICKED(IDC_BUTTON_PFUN, &CMyDlgBarFuncKey::OnBnClickedBtnPFun)
|
| | | ON_BN_CLICKED(IDC_BUTTON_UPDOWN, &CMyDlgBarFuncKey::OnBnClickedBtnUpDown) |
| | | ON_BN_CLICKED(IDC_BUTTON_BIT, &CMyDlgBarFuncKey::OnBnClickedBtnBit)
|
| | | ON_BN_CLICKED(IDC_BUTTON_WORD, &CMyDlgBarFuncKey::OnBnClickedBtnWord)
|
| | | ON_BN_CLICKED(IDC_BUTTON_INSTRUCTION1, &CMyDlgBarFuncKey::OnBnClickedBtnInc1)
|
| | | ON_BN_CLICKED(IDC_BUTTON_INSTRUCTION2, &CMyDlgBarFuncKey::OnBnClickedBtnInc2)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_PGCONVERT, &CMyDlgBarFuncKey::OnBnClickedBtnPgConvert)
|
| | | ON_BN_CLICKED(IDC_BUTTON_ONLINE, &CMyDlgBarFuncKey::OnBnClickedBtnOnline)
|
| | | ON_BN_CLICKED(IDC_BUTTON_OFFLINE, &CMyDlgBarFuncKey::OnBnClickedBtnOffline)
|
| | | ON_BN_CLICKED(IDC_BUTTON_COLSE, &CMyDlgBarFuncKey::OnBnClickedBtnClose)
|
| | | ON_BN_CLICKED(IDC_BUTTON_FIND, &CMyDlgBarFuncKey::OnBnClickedBtnFind)
|
| | | ON_BN_CLICKED(IDC_BUTTON_NEXTWIN, &CMyDlgBarFuncKey::OnBnClickedBtnNextWin)
|
| | | ON_BN_CLICKED(IDC_BUTTON_MONITOR, &CMyDlgBarFuncKey::OnBnClickedBtnMonitor)
|
| | | ON_BN_CLICKED(IDC_BUTTON_STATUS, &CMyDlgBarFuncKey::OnBnClickedBtnStatus)
|
| | | ON_BN_CLICKED(IDC_BUTTON_RUNPROG, &CMyDlgBarFuncKey::OnBnClickedBtnRunProg)
|
| | | ON_BN_CLICKED(IDC_BUTTON_PLCREAD, &CMyDlgBarFuncKey::OnBnClickedBtnPlcRead)
|
| | | ON_BN_CLICKED(IDC_BUTTON_PLCWRITE, &CMyDlgBarFuncKey::OnBnClickedBtnPlcWrite)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_X, &CMyDlgBarFuncKey::OnBnClickedBtnX)
|
| | | ON_BN_CLICKED(IDC_BUTTON_Y, &CMyDlgBarFuncKey::OnBnClickedBtnY)
|
| | | ON_BN_CLICKED(IDC_BUTTON_R, &CMyDlgBarFuncKey::OnBnClickedBtnR)
|
| | | ON_BN_CLICKED(IDC_BUTTON_L, &CMyDlgBarFuncKey::OnBnClickedBtnL)
|
| | | ON_BN_CLICKED(IDC_BUTTON_P, &CMyDlgBarFuncKey::OnBnClickedBtnP)
|
| | | ON_BN_CLICKED(IDC_BUTTON_COMPARE1, &CMyDlgBarFuncKey::OnBnClickedBtnCompare1)
|
| | | ON_BN_CLICKED(IDC_BUTTON_NOT1, &CMyDlgBarFuncKey::OnBnClickedBtnNot)
|
| | | ON_BN_CLICKED(IDC_BUTTON_T, &CMyDlgBarFuncKey::OnBnClickedBtnT)
|
| | | ON_BN_CLICKED(IDC_BUTTON_C, &CMyDlgBarFuncKey::OnBnClickedBtnC)
|
| | | ON_BN_CLICKED(IDC_BUTTON_E, &CMyDlgBarFuncKey::OnBnClickedBtnE)
|
| | | ON_BN_CLICKED(IDC_BUTTON_UPDOWN1, &CMyDlgBarFuncKey::OnBnClickedBtnUpDown)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_TMX, &CMyDlgBarFuncKey::OnBnClickedBtnTmx)
|
| | | ON_BN_CLICKED(IDC_BUTTON_TMY, &CMyDlgBarFuncKey::OnBnClickedBtnTmy)
|
| | | ON_BN_CLICKED(IDC_BUTTON_TMR, &CMyDlgBarFuncKey::OnBnClickedBtnTmr)
|
| | | ON_BN_CLICKED(IDC_BUTTON_TML, &CMyDlgBarFuncKey::OnBnClickedBtnTml)
|
| | | ON_BN_CLICKED(IDC_BUTTON_CT, &CMyDlgBarFuncKey::OnBnClickedBtnCt)
|
| | |
|
| | | ON_BN_CLICKED(IDC_BUTTON_D, &CMyDlgBarFuncKey::OnBnClickedBtnD)
|
| | | ON_BN_CLICKED(IDC_BUTTON_F, &CMyDlgBarFuncKey::OnBnClickedBtnF)
|
| | | ON_BN_CLICKED(IDC_BUTTON_NEQ, &CMyDlgBarFuncKey::OnBnClickedBtnNEQ)
|
| | | ON_BN_CLICKED(IDC_BUTTON_GT, &CMyDlgBarFuncKey::OnBnClickedBtnGT)
|
| | | ON_BN_CLICKED(IDC_BUTTON_LT, &CMyDlgBarFuncKey::OnBnClickedBtnLT)
|
| | |
|
| | | END_MESSAGE_MAP()
|
| | |
|
| | |
|
| | | // CMyDlgBarFuncKey 消息处理程序
|
| | |
|
| | |
|
| | |
|
| | | LRESULT CMyDlgBarFuncKey::OnInitDialog(WPARAM wParam, LPARAM lParam)
|
| | |
| | | {
|
| | | TRACE("InitDialogBar Failed!");
|
| | | }
|
| | |
|
| | | CRect rect0;
|
| | | GetClientRect(&rect0);
|
| | | int nWidth = rect0.Width();
|
| | |
| | | int nLeftMargin = 48;
|
| | | int nSpace = nWidth - nLeftMargin;
|
| | | int x1, y1, x2, y2;
|
| | | CRect rect1(0, 0, 100, 24);
|
| | | CRect rect1(0, 0, 100, 10);
|
| | | // font1.CreatePointFont(95, _T("楷体"));
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 12; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 12;
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 12;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | m_buttons[i][j].Create(myButtons[i][j].sCaption, BS_FLAT | WS_CHILD | WS_TABSTOP | WS_VISIBLE | BS_PUSHBUTTON, rect1, this, myButtons[i][j].nID);
|
| | | 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);
|
| | | // init;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | 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);
|
| | | // bit;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | 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);
|
| | | // compare;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | 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);
|
| | | // word;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | 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);
|
| | | // index;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < m_Lines; i++) {
|
| | | for (int j = 0; j < 11; j++) {
|
| | | x1 = nLeftMargin + j * nSpace / 11;
|
| | | y1 = i * nHeight / 3;
|
| | | x2 = x1 + nSpace / 11;
|
| | | y2 = y1 + nHeight / 3;
|
| | | rect1.SetRect(x1, y1, x2, y2);
|
| | | 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);
|
| | | // TMCT;
|
| | | }
|
| | | }
|
| | |
|
| | | return bRet; // return TRUE unless you set the focus to a control
|
| | | // EXCEPTION: OCX Property Pages should return FALSE
|
| | | return false;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | BOOL CMyDlgBarFuncKey::Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
|
| | | {
|
| | | // TODO: 在此添加专用代码和/或调用基类
|
| | | BOOL bRes = CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID);
|
| | | // OnInitDialog(0,0);
|
| | | // OnInitDialog(0,0);
|
| | | return bRes;
|
| | | //
|
| | | // return CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID);
|
| | | //
|
| | | // return CDialogBar::Create(pParentWnd, nIDTemplate, nStyle, nID);
|
| | | }
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHandler)
|
| | | {
|
| | | // TODO: 在此添加专用代码和/或调用基类
|
| | | CDialogBar::OnUpdateCmdUI(pTarget, FALSE);
|
| | | CDialogBar::OnUpdateCmdUI(pTarget, FALSE);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | s1.Format(_T("Button1 Clicked"));
|
| | | SysLog(s1);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::SetBtnDisplayESC()
|
| | | {
|
| | | switch (current_btn_window)
|
| | | {
|
| | | case 1:
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[2][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 3:
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[3][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 4:
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[4][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 5:
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnAnd()
|
| | | {
|
| | | |
| | |
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010001);
|
| | |
|
| | |
|
| | | //CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("X"));
|
| | | for (int i = 0;i < 3;i++){
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | |
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnOr()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010002); |
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnVline()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("|"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnOut()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010003);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnTmCt()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0001000b);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 5;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnFun()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Fun "));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnHLine()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("——"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnNot() /****************************************************************************/
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010013);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnIndex()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Index "));
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[4][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 4;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnMc()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010004);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnMce()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010005);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnSet()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010006);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnReset()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010007);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnDf()
|
| | | {
|
| | | |
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010008);
|
| | |
|
| | | //p1->GetInputInfo(_T("(DF)"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnEnd()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0001000A);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnCompare()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Compare"));
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[2][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 2;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnPFun()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("PFun"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnUpDown() |
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010010);
|
| | |
|
| | |
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnBit()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Bit"));
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 1;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnWord()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Word"));
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[3][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 3;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnInc1()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Inc1"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnInc2()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Inc2"));
|
| | | }
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnPgConvert()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("PgConvert"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnOnline()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Online"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnOffline()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Offline"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnClose()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Close"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnFind()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Find"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnNextWin()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("NextWin"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnMonitor()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Monitor"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnStatus()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("Status"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnRunProg()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("RunProg"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnPlcRead()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("PlcRead"));
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnPlcWrite()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | //p1->GetInputInfo(_T("PlcWrite"));
|
| | | }
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnX()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020001);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnY()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020002);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnR()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020003);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnL()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020004);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnP()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020005);
|
| | | }
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnCompare1()
|
| | | {
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[1][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[2][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 2;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnT()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020006);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnC()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020007);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnE()
|
| | | {
|
| | | |
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020008);
|
| | | }
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnTmx()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00020009);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 0;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnTmy()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000A);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 0;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnTmr()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000B);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 0;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnTml()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000C);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 0;
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnCt()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000D);
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[5][i][j].ShowWindow(SW_HIDE);
|
| | | }
|
| | | }
|
| | | for (int i = 0;i < 3;i++) {
|
| | | for (int j = 0;j < 11;j++) {
|
| | | m_buttons[0][i][j].ShowWindow(SW_SHOW);
|
| | | }
|
| | | }
|
| | | current_btn_window = 0;
|
| | | }
|
| | |
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnD()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010015);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnF()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x00010016);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnNEQ()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000D);
|
| | |
|
| | | }
|
| | |
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnGT()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000E);
|
| | | }
|
| | | void CMyDlgBarFuncKey::OnBnClickedBtnLT()
|
| | | {
|
| | | CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
| | | p1->GetInputInfo(0x0002000F);
|
| | |
|
| | | } |