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

📄 modecount.cpp

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CModeCount dialog

CModeCount::CModeCount(CWnd* pParent /*=NULL*/)
	: CDialog(CModeCount::IDD, pParent)
{
	//{{AFX_DATA_INIT(CModeCount)
	m_edt1 = 0;
	m_edt2 = 0;
	m_edt3 = 0;
	m_edt4 = 0.0f;
	//}}AFX_DATA_INIT
}


void CModeCount::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CModeCount)
	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_EDIT1, m_edit1);
	DDX_Text(pDX, IDC_EDIT1, m_edt1);
	DDX_Text(pDX, IDC_EDIT2, m_edt2);
	DDX_Text(pDX, IDC_EDIT3, m_edt3);
	DDX_Text(pDX, IDC_EDIT4, m_edt4);
	//}}AFX_DATA_MAP
}


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

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


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

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

void CModeCount::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 CModeCount::OnButton3() 
{
	// TODO: Add your control notification handler code here
	UpdateData();

	m_edt2=0;
	UpdateData(FALSE);
}


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


BOOL CModeCount::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 + -