modespay.cpp
来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 119 行
CPP
119 行
// ModeSpay.cpp : implementation file
//
#include "stdafx.h"
#include "alfa.h"
#include "ModeSpay.h"
#include "Main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CModeSpay dialog
CModeSpay::CModeSpay(CWnd* pParent /*=NULL*/)
: CDialog(CModeSpay::IDD, pParent)
{
//{{AFX_DATA_INIT(CModeSpay)
m_edt1 = 0.0f;
m_edt2 = 0.0f;
m_edt3 = 0.0f;
m_edt4 = 0;
m_edt5 = 0;
//}}AFX_DATA_INIT
}
void CModeSpay::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CModeSpay)
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_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);
DDX_Text(pDX, IDC_EDIT5, m_edt5);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CModeSpay, CDialog)
//{{AFX_MSG_MAP(CModeSpay)
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()
/////////////////////////////////////////////////////////////////////////////
// CModeSpay message handlers
void CModeSpay::OnButton3()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
ShowWindow(FALSE);
CMain * main=(CMain *)GetParent();
main->dlgmode->ShowWindow(TRUE);
}
void CModeSpay::OnButton1()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
ShowWindow(FALSE);
CMain * main=(CMain *)GetParent();
main->dlgmodecount->ShowWindow(TRUE);
}
void CModeSpay::OnButton2()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
ShowWindow(FALSE);
CMain * main=(CMain *)GetParent();
main->dlgmodetimer->ShowWindow(TRUE);
}
void CModeSpay::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 CModeSpay::OnButton4()
{
// TODO: Add your control notification handler code here
UpdateData();
CMain * main=(CMain *)GetParent();
ShowWindow(FALSE);
main->dlgmodespeed->ShowWindow(TRUE);
}
BOOL CModeSpay::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 + =
减小字号Ctrl + -
显示快捷键?