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

📄 modetimer.cpp

📁 机械手IPC控制器伺服运动程序
💻 CPP
字号:
// ModeTimer.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "ModeTimer.h"
#include "Main.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CModeTimer dialog


CModeTimer::CModeTimer(CWnd* pParent /*=NULL*/)
	: CDialog(CModeTimer::IDD, pParent)
{
	//{{AFX_DATA_INIT(CModeTimer)
	m_edt1 = 0.0f;
	m_edt10 = 0.0f;
	m_edt11 = 0.0f;
	m_edt12 = 0.0f;
	m_edt13 = 0.0f;
	m_edt14 = 0.0f;
	m_edt15 = 0.0f;
	m_edt16 = 0.0f;
	m_edt17 = 0.0f;
	m_edt18 = 0.0f;
	m_edt2 = 0.0f;
	m_edt3 = 0.0f;
	m_edt4 = 0.0f;
	m_edt5 = 0.0f;
	m_edt6 = 0.0f;
	m_edt7 = 0.0f;
	m_edt8 = 0.0f;
	m_edt9 = 0.0f;
	//}}AFX_DATA_INIT
}


void CModeTimer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CModeTimer)
	DDX_Control(pDX, IDC_EDIT9, m_edit9);
	DDX_Control(pDX, IDC_EDIT8, m_edit8);
	DDX_Control(pDX, IDC_EDIT7, m_edit7);
	DDX_Control(pDX, IDC_EDIT6, m_edit6);
	DDX_Control(pDX, IDC_EDIT5, m_edit5);
	DDX_Control(pDX, IDC_EDIT4, m_edit4);
	DDX_Control(pDX, IDC_EDIT3, m_edit3);
	DDX_Control(pDX, IDC_EDIT2, m_edit2);
	DDX_Control(pDX, IDC_EDIT18, m_edit18);
	DDX_Control(pDX, IDC_EDIT17, m_edit17);
	DDX_Control(pDX, IDC_EDIT16, m_edit16);
	DDX_Control(pDX, IDC_EDIT15, m_edit15);
	DDX_Control(pDX, IDC_EDIT14, m_edit14);
	DDX_Control(pDX, IDC_EDIT13, m_edit13);
	DDX_Control(pDX, IDC_EDIT12, m_edit12);
	DDX_Control(pDX, IDC_EDIT11, m_edit11);
	DDX_Control(pDX, IDC_EDIT10, m_edit10);
	DDX_Control(pDX, IDC_EDIT1, m_edit1);
	DDX_Text(pDX, IDC_EDIT1, m_edt1);
	DDX_Text(pDX, IDC_EDIT10, m_edt10);
	DDX_Text(pDX, IDC_EDIT11, m_edt11);
	DDX_Text(pDX, IDC_EDIT12, m_edt12);
	DDX_Text(pDX, IDC_EDIT13, m_edt13);
	DDX_Text(pDX, IDC_EDIT14, m_edt14);
	DDX_Text(pDX, IDC_EDIT15, m_edt15);
	DDX_Text(pDX, IDC_EDIT16, m_edt16);
	DDX_Text(pDX, IDC_EDIT17, m_edt17);
	DDX_Text(pDX, IDC_EDIT18, m_edt18);
	DDX_Text(pDX, IDC_EDIT2, m_edt2);
	DDX_Text(pDX, IDC_EDIT3, m_edt3);
	DDX_Text(pDX, IDC_EDIT4, m_edt4);
	DDX_Text(pDX, IDC_EDIT5, m_edt5);
	DDX_Text(pDX, IDC_EDIT6, m_edt6);
	DDX_Text(pDX, IDC_EDIT7, m_edt7);
	DDX_Text(pDX, IDC_EDIT8, m_edt8);
	DDX_Text(pDX, IDC_EDIT9, m_edt9);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CModeTimer, CDialog)
	//{{AFX_MSG_MAP(CModeTimer)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_WM_SHOWWINDOW()
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CModeTimer message handlers

void CModeTimer::OnButton3() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	ShowWindow(FALSE);
	CMain * main=(CMain *)GetParent();
	main->dlgmode->ShowWindow(TRUE);
}

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

/*
void CModeTimer::OnButton2() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	ShowWindow(FALSE);
	CMain * main=(CMain *)GetParent();
	main->dlgmodespay->ShowWindow(TRUE);
}
*/

void CModeTimer::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	if(bShow==1) {
		CMain * main=(CMain *)GetParent();
		main->dlgcur=this;
	}
}

void CModeTimer::OnButton4() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	CMain * main=(CMain *)GetParent();
	ShowWindow(FALSE);
	main->dlgmodespeed->ShowWindow(TRUE);
}

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

⌨️ 快捷键说明

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