⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mode.cpp

📁 机械手IPC控制器伺服运动程序
💻 CPP
📖 第 1 页 / 共 2 页
字号:
// Mode.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "Mode.h"
#include "Main.h"
#include "KeyNumber.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMode dialog

CMode::CMode(CWnd* pParent )
: CDialog(CMode::IDD, pParent)	
{
	//{{AFX_DATA_INIT(CMode)
	m_radio1 = -1;
	m_radio10 = -1;
	m_radio11 = -1;
	m_radio12 = -1;
	m_radio13 = -1;
	m_radio14 = -1;
	m_radio15 = -1;
//	m_radio16 = -1;
//	m_radio17 = -1;
//	m_radio18 = -1;
//	m_radio19 = -1;
	m_radio2 = -1;
	m_radio20 = -1;
	m_radio21 = -1;
	m_radio22 = -1;
	m_radio23 = -1;
	m_radio26 = -1;
	m_radio27 = -1;
//	m_radio28 = -1;
//	m_radio29 = -1;
	m_radio3 = -1;
//	m_radio30 = -1;
	m_radio31 = -1;
	m_radio32 = -1;
	m_radio4 = -1;
	m_radio5 = -1;
	m_radio6 = -1;
	m_radio7 = -1;
	m_radio8 = -1;
	m_radio9 = -1;
	m_radio24 = -1;
	m_radio25 = -1;
//	m_shake = 0;
	m_radio33 = -1;
	m_radio34 = -1;
	m_radio35 = -1;
	m_radio36 = -1;
	m_radio37 = -1;
	m_radio38 = -1;
//	m_radio39 = -1;
//	m_radio40 = -1;
	m_radio41 = -1;
	m_radio42 = -1;
	//}}AFX_DATA_INIT
}


void CMode::DoDataExchange(CDataExchange* pDX)
{
	//CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMode)
//	DDX_Control(pDX, IDC_EDIT4, m_edt4);
	DDX_Radio(pDX, IDC_RADIO1, m_radio1);
	DDX_Radio(pDX, IDC_RADIO10, m_radio10);
	DDX_Radio(pDX, IDC_RADIO11, m_radio11);
	DDX_Radio(pDX, IDC_RADIO12, m_radio12);
	DDX_Radio(pDX, IDC_RADIO13, m_radio13);
	DDX_Radio(pDX, IDC_RADIO14, m_radio14);
	DDX_Radio(pDX, IDC_RADIO15, m_radio15);
//	DDX_Radio(pDX, IDC_RADIO16, m_radio16);
//	DDX_Radio(pDX, IDC_RADIO17, m_radio17);
//	DDX_Radio(pDX, IDC_RADIO18, m_radio18);
//	DDX_Radio(pDX, IDC_RADIO19, m_radio19);
	DDX_Radio(pDX, IDC_RADIO2, m_radio2);
	DDX_Radio(pDX, IDC_RADIO20, m_radio20);
	DDX_Radio(pDX, IDC_RADIO21, m_radio21);
	DDX_Radio(pDX, IDC_RADIO22, m_radio22);
	DDX_Radio(pDX, IDC_RADIO23, m_radio23);
	DDX_Radio(pDX, IDC_RADIO26, m_radio26);
	DDX_Radio(pDX, IDC_RADIO27, m_radio27);
//	DDX_Radio(pDX, IDC_RADIO28, m_radio28);
//	DDX_Radio(pDX, IDC_RADIO29, m_radio29);
	DDX_Radio(pDX, IDC_RADIO3, m_radio3);
//	DDX_Radio(pDX, IDC_RADIO30, m_radio30);
	DDX_Radio(pDX, IDC_RADIO31, m_radio31);
	DDX_Radio(pDX, IDC_RADIO32, m_radio32);
	DDX_Radio(pDX, IDC_RADIO4, m_radio4);
	DDX_Radio(pDX, IDC_RADIO5, m_radio5);
	DDX_Radio(pDX, IDC_RADIO6, m_radio6);
	DDX_Radio(pDX, IDC_RADIO7, m_radio7);
	DDX_Radio(pDX, IDC_RADIO8, m_radio8);
	DDX_Radio(pDX, IDC_RADIO9, m_radio9);
	DDX_Radio(pDX, IDC_RADIO24, m_radio24);
	DDX_Radio(pDX, IDC_RADIO25, m_radio25);
//	DDX_Text(pDX, IDC_EDIT4, m_shake);
	DDX_Radio(pDX, IDC_RADIO33, m_radio33);
	DDX_Radio(pDX, IDC_RADIO34, m_radio34);
	DDX_Radio(pDX, IDC_RADIO35, m_radio35);
	DDX_Radio(pDX, IDC_RADIO36, m_radio36);
	DDX_Radio(pDX, IDC_RADIO37, m_radio37);
	DDX_Radio(pDX, IDC_RADIO38, m_radio38);
//	DDX_Radio(pDX, IDC_RADIO39, m_radio39);
//	DDX_Radio(pDX, IDC_RADIO40, m_radio40);
	DDX_Radio(pDX, IDC_RADIO41, m_radio41);
	DDX_Radio(pDX, IDC_RADIO42, m_radio42);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMode, CDialog)
	//{{AFX_MSG_MAP(CMode)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
	ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
	ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
	ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
	ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
	ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
	ON_BN_CLICKED(IDC_RADIO9, OnRadio9)
	ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
	ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
	ON_BN_CLICKED(IDC_RADIO12, OnRadio12)
	ON_BN_CLICKED(IDC_RADIO13, OnRadio13)
	ON_BN_CLICKED(IDC_RADIO14, OnRadio14)
	ON_BN_CLICKED(IDC_RADIO15, OnRadio15)
//	ON_BN_CLICKED(IDC_RADIO16, OnRadio16)
//	ON_BN_CLICKED(IDC_RADIO17, OnRadio17)
//	ON_BN_CLICKED(IDC_RADIO18, OnRadio18)
//	ON_BN_CLICKED(IDC_RADIO19, OnRadio19)
	ON_BN_CLICKED(IDC_RADIO20, OnRadio20)
	ON_BN_CLICKED(IDC_RADIO21, OnRadio21)
	ON_BN_CLICKED(IDC_RADIO26, OnRadio26)
	ON_BN_CLICKED(IDC_RADIO27, OnRadio27)
	ON_BN_CLICKED(IDC_RADIO22, OnRadio22)
	ON_BN_CLICKED(IDC_RADIO23, OnRadio23)
	ON_BN_CLICKED(IDC_RADIO28, OnRadio28)
	ON_BN_CLICKED(IDC_RADIO29, OnRadio29)
	ON_BN_CLICKED(IDC_RADIO24, OnRadio24)
	ON_BN_CLICKED(IDC_RADIO25, OnRadio25)
//	ON_BN_CLICKED(IDC_RADIO30, OnRadio30)
	ON_BN_CLICKED(IDC_RADIO31, OnRadio31)
	ON_BN_CLICKED(IDC_RADIO32, OnRadio32)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_RADIO33, OnRadio33)
	ON_BN_CLICKED(IDC_RADIO34, OnRadio34)
	ON_BN_CLICKED(IDC_RADIO35, OnRadio35)
	ON_BN_CLICKED(IDC_RADIO36, OnRadio36)
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_RADIO37, OnRadio37)
	ON_BN_CLICKED(IDC_RADIO38, OnRadio38)
//	ON_BN_CLICKED(IDC_RADIO39, OnRadio39)
//	ON_BN_CLICKED(IDC_RADIO40, OnRadio40)
	ON_BN_CLICKED(IDC_RADIO41, OnRadio41)
	ON_BN_CLICKED(IDC_RADIO42, OnRadio42)
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	ON_BN_CLICKED(IDC_BUTTON41, OnButton41)

	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMode message handlers

void CMode::OnButton1() 
{
	// TODO: Add your control notification handler code here
	if(!UpdateData()) return;
	ShowWindow(FALSE);
	CMain * main=(CMain *)GetParent();
	main->dlgfixedmode->ShowWindow(TRUE);
}

BOOL CMode::OnInitDialog() 
{
	// TODO: Add extra initialization here
	CDialog::OnInitDialog();
	h_SkinDialog.SubClassDialog(m_hWnd);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

// Vac5 Check
void CMode::OnRadio1() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(1);
	((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(0);
}
void CMode::OnRadio2() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO2))->SetCheck(1);
}

// Vac2 Check
void CMode::OnRadio3() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO3))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO4))->SetCheck(0);
}
void CMode::OnRadio4() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO4))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO3))->SetCheck(0);
}


void CMode::OnRadio5() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(0);
	((CButton *)GetDlgItem(IDC_RADIO7))->SetCheck(0);
}
void CMode::OnRadio6() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(1);
	((CButton *)GetDlgItem(IDC_RADIO7))->SetCheck(0);
}
void CMode::OnRadio7() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO5))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO6))->SetCheck(0);
	((CButton *)GetDlgItem(IDC_RADIO7))->SetCheck(1);
}


void CMode::OnRadio8() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO8))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO9))->SetCheck(0);
	((CButton *)GetDlgItem(IDC_RADIO10))->SetCheck(0);
}
void CMode::OnRadio9() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO8))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO9))->SetCheck(1);
	((CButton *)GetDlgItem(IDC_RADIO10))->SetCheck(0);
}
void CMode::OnRadio10() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO8))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO9))->SetCheck(0);
	((CButton *)GetDlgItem(IDC_RADIO10))->SetCheck(1);
}

// Vac4 Check
void CMode::OnRadio11() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO11))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO12))->SetCheck(0);
}
void CMode::OnRadio12() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO11))->SetCheck(0);
    ((CButton *)GetDlgItem(IDC_RADIO12))->SetCheck(1);
}


void CMode::OnRadio13() 
{
	// TODO: Add your control notification handler code here
	((CButton *)GetDlgItem(IDC_RADIO13))->SetCheck(1);
    ((CButton *)GetDlgItem(IDC_RADIO14))->SetCheck(0);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -