📄 arc.cpp
字号:
// Arc.cpp : implementation file
//
#include "stdafx.h"
#include "数控插补程序.h"
#include "Arc.h"
#include "Math.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CArc dialog
CArc::CArc(CWnd* pParent /*=NULL*/)
: CDialog(CArc::IDD, pParent)
{
//{{AFX_DATA_INIT(CArc)
m_m1 = 0.0;
m_m2 = 0.0;
m_n1 = 0.0;
m_n2 = 0.0;
m_r = 0.0;
m_b = 0.0;
//}}AFX_DATA_INIT
}
void CArc::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CArc)
DDX_Control(pDX, IDC_BUTTON_R, m_button);
DDX_Text(pDX, IDC_M1, m_m1);
DDV_MinMaxDouble(pDX, m_m1, -200., 200.);
DDX_Text(pDX, IDC_M2, m_m2);
DDV_MinMaxDouble(pDX, m_m2, -200., 200.);
DDX_Text(pDX, IDC_N1, m_n1);
DDV_MinMaxDouble(pDX, m_n1, -150., 150.);
DDX_Text(pDX, IDC_N2, m_n2);
DDV_MinMaxDouble(pDX, m_n2, -150., 150.);
DDX_Text(pDX, IDC_R, m_r);
DDX_Text(pDX, IDC_YB, m_b);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CArc, CDialog)
//{{AFX_MSG_MAP(CArc)
ON_BN_CLICKED(IDC_BUTTON_R, OnButtonR)
ON_EN_CHANGE(IDC_M1, OnChangeM1)
ON_EN_CHANGE(IDC_N1, OnChangeN1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CArc message handlers
void CArc::OnButtonR()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
m_r=sqrt(m_m1*m_m1+m_n1*m_n1);
UpdateData(FALSE);
}
void CArc::OnChangeM1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
}
void CArc::OnChangeN1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
}
void CArc::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -