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

📄 parawnddlg.cpp

📁 波峰焊后台控制软件-英文版
💻 CPP
📖 第 1 页 / 共 3 页
字号:
// ParaWndDlg.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "ParaWndDlg.h"
#include "FLADS.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CParaWndDlg dialog

static UINT ParaID[12*5+6] = 
{ 
	IDC_KP_SL,IDC_KP_RH1,	IDC_KP_RH2,	IDC_KP_RH3,
	IDC_KI_SL,IDC_KI_RH1,	IDC_KI_RH2,	IDC_KI_RH3,
	IDC_KD_SL,IDC_KD_RH1,	IDC_KD_RH2,	IDC_KD_RH3,
    IDC_ACC_FF_SL,IDC_ACC_FF_RH1,IDC_ACC_FF_RH2,IDC_ACC_FF_RH3,
    IDC_FRI_FF_SL,IDC_FRI_FF_RH1,IDC_FRI_FF_RH2,IDC_FRI_FF_RH3,
    IDC_VEL_FF_SL,IDC_VEL_FF_RH1,IDC_VEL_FF_RH2,IDC_VEL_FF_RH3,
    IDC_HOLD_SL,IDC_HOLD_RH1,  IDC_HOLD_RH2,  IDC_HOLD_RH3,  
    IDC_BIAS_SL,IDC_BIAS_RH1,  IDC_BIAS_RH2,  IDC_BIAS_RH3,  
    IDC_ACCEL_SL,IDC_ACCEL_RH1, IDC_ACCEL_RH2, IDC_ACCEL_RH3, 
    IDC_SLEW_SL,IDC_SLEW_RH1,  IDC_SLEW_RH2,  IDC_SLEW_RH3,  
    IDC_SCALE_SL,IDC_SCALE_RH1, IDC_SCALE_RH2, IDC_SCALE_RH3,
    IDC_ZERO_SL,IDC_ZERO_RH1,  IDC_ZERO_RH2,  IDC_ZERO_RH3,  
	IDC_INTREGL_SL,IDC_INTREGL_RH1,IDC_INTREGL_RH2,IDC_INTREGL_RH3,
	IDC_SCALE_TEST1,IDC_SCALE_TEST2,IDC_SCALE_TEST3,
    IDC_ZERO_TEST1, IDC_ZERO_TEST2, IDC_ZERO_TEST3
};




extern CFLADSApp theApp;
CParaWndDlg::CParaWndDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CParaWndDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CParaWndDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CParaWndDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CParaWndDlg)
	DDX_Control(pDX, IDC_SPLIT4, m_split4);
	DDX_Control(pDX, IDC_SPLIT3, m_split3);
	DDX_Control(pDX, IDC_SPLIT2, m_split2);
	DDX_Control(pDX, IDC_SPLIT1, m_split1);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CParaWndDlg, CDialog)
	//{{AFX_MSG_MAP(CParaWndDlg)
	ON_EN_CHANGE(IDC_KP_RH1, OnChangeKpRh1)
	ON_EN_CHANGE(IDC_KP_RH2, OnChangeKpRh2)
	ON_EN_CHANGE(IDC_KP_RH3, OnChangeKpRh3)
	ON_EN_CHANGE(IDC_KP_SL, OnChangeKpSl)
	ON_EN_CHANGE(IDC_KI_RH1, OnChangeKiRh1)
	ON_EN_CHANGE(IDC_KI_RH2, OnChangeKiRh2)
	ON_EN_CHANGE(IDC_KI_RH3, OnChangeKiRh3)
	ON_EN_CHANGE(IDC_KI_SL, OnChangeKiSl)
	ON_EN_CHANGE(IDC_KD_RH1, OnChangeKdRh1)
	ON_EN_CHANGE(IDC_KD_RH2, OnChangeKdRh2)
	ON_EN_CHANGE(IDC_KD_RH3, OnChangeKdRh3)
	ON_EN_CHANGE(IDC_KD_SL, OnChangeKdSl)
	ON_EN_CHANGE(IDC_ACC_FF_RH1, OnChangeAccFfRh1)
	ON_EN_CHANGE(IDC_ACC_FF_RH2, OnChangeAccFfRh2)
	ON_EN_CHANGE(IDC_ACC_FF_RH3, OnChangeAccFfRh3)
	ON_EN_CHANGE(IDC_ACC_FF_SL, OnChangeAccFfSl)
	ON_EN_CHANGE(IDC_FRI_FF_RH1, OnChangeFriFfRh1)
	ON_EN_CHANGE(IDC_FRI_FF_RH2, OnChangeFriFfRh2)
	ON_EN_CHANGE(IDC_FRI_FF_RH3, OnChangeFriFfRh3)
	ON_EN_CHANGE(IDC_FRI_FF_SL, OnChangeFriFfSl)
	ON_EN_CHANGE(IDC_VEL_FF_RH1, OnChangeVelFfRh1)
	ON_EN_CHANGE(IDC_VEL_FF_RH2, OnChangeVelFfRh2)
	ON_EN_CHANGE(IDC_VEL_FF_RH3, OnChangeVelFfRh3)
	ON_EN_CHANGE(IDC_VEL_FF_SL, OnChangeVelFfSl)
	ON_EN_CHANGE(IDC_HOLD_RH1, OnChangeHoldRh1)
	ON_EN_CHANGE(IDC_HOLD_RH2, OnChangeHoldRh2)
	ON_EN_CHANGE(IDC_HOLD_RH3, OnChangeHoldRh3)
	ON_EN_CHANGE(IDC_HOLD_SL, OnChangeHoldSl)
	ON_EN_CHANGE(IDC_BIAS_RH1, OnChangeBiasRh1)
	ON_EN_CHANGE(IDC_BIAS_RH2, OnChangeBiasRh2)
	ON_EN_CHANGE(IDC_BIAS_RH3, OnChangeBiasRh3)
	ON_EN_CHANGE(IDC_BIAS_SL, OnChangeBiasSl)
	ON_EN_CHANGE(IDC_ACCEL_RH1, OnChangeAccelRh1)
	ON_EN_CHANGE(IDC_ACCEL_RH2, OnChangeAccelRh2)
	ON_EN_CHANGE(IDC_ACCEL_RH3, OnChangeAccelRh3)
	ON_EN_CHANGE(IDC_ACCEL_SL, OnChangeAccelSl)
	ON_EN_CHANGE(IDC_SLEW_RH1, OnChangeSlewRh1)
	ON_EN_CHANGE(IDC_SLEW_RH2, OnChangeSlewRh2)
	ON_EN_CHANGE(IDC_SLEW_RH3, OnChangeSlewRh3)
	ON_EN_CHANGE(IDC_SLEW_SL, OnChangeSlewSl)
	ON_EN_CHANGE(IDC_SCALE_RH1, OnChangeScaleRh1)
	ON_EN_CHANGE(IDC_SCALE_RH2, OnChangeScaleRh2)
	ON_EN_CHANGE(IDC_SCALE_RH3, OnChangeScaleRh3)
	ON_EN_CHANGE(IDC_SCALE_SL, OnChangeScaleSl)
	ON_EN_CHANGE(IDC_ZERO_RH1, OnChangeZeroRh1)
	ON_EN_CHANGE(IDC_ZERO_RH2, OnChangeZeroRh2)
	ON_EN_CHANGE(IDC_ZERO_RH3, OnChangeZeroRh3)
	ON_EN_CHANGE(IDC_ZERO_SL, OnChangeZeroSl)
	ON_EN_CHANGE(IDC_INTREGL_RH1, OnChangeIntreglRh1)
	ON_EN_CHANGE(IDC_INTREGL_RH2, OnChangeIntreglRh2)
	ON_EN_CHANGE(IDC_INTREGL_RH3, OnChangeIntreglRh3)
	ON_EN_CHANGE(IDC_INTREGL_SL, OnChangeIntreglSl)
	ON_WM_DESTROY()
	ON_WM_CTLCOLOR()
	ON_EN_CHANGE(IDC_SCALE_TEST1, OnChangeScaleTest1)
	ON_EN_CHANGE(IDC_SCALE_TEST2, OnChangeScaleTest2)
	ON_EN_CHANGE(IDC_SCALE_TEST3, OnChangeScaleTest3)
	ON_EN_CHANGE(IDC_ZERO_TEST1, OnChangeZeroTest1)
	ON_EN_CHANGE(IDC_ZERO_TEST2, OnChangeZeroTest2)
	ON_EN_CHANGE(IDC_ZERO_TEST3, OnChangeZeroTest3)
	ON_BN_CLICKED(IDC_SPLIT1, OnSplit1)
	ON_BN_CLICKED(IDC_SPLIT2, OnSplit2)
	ON_BN_CLICKED(IDC_SPLIT3, OnSplit3)
	ON_BN_CLICKED(IDC_SPLIT4, OnSplit4)
	ON_EN_CHANGE(IDC_SL_TIMER, OnChangeSlTimer)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CParaWndDlg message handlers
void CParaWndDlg::OnChangeKpRh1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KP_RH1,wBuf,20);
    theApp.p_gain[1]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeKpRh2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KP_RH2,wBuf,20);
    theApp.p_gain[2]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeKpRh3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KP_RH3,wBuf,20);
    theApp.p_gain[3]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeKpSl() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KP_SL,wBuf,20);
    theApp.p_gain[0]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeKiRh1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KI_RH1,wBuf,20);
    theApp.i_gain[1]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeKiRh2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KI_RH2,wBuf,20);
    theApp.i_gain[2]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeKiRh3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KI_RH3,wBuf,20);
    theApp.i_gain[3]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeKiSl() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KI_SL,wBuf,20);
    theApp.i_gain[0]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeKdRh1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KD_RH1,wBuf,20);
    theApp.d_gain[1]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeKdRh2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KD_RH2,wBuf,20);
    theApp.d_gain[2]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeKdRh3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KD_RH3,wBuf,20);
    theApp.d_gain[3]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeKdSl() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_KD_SL,wBuf,20);
    theApp.d_gain[0]=theApp.ReadDataChar(wBuf);	
	
}

void CParaWndDlg::OnChangeAccFfRh1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_ACC_FF_RH1,wBuf,20);
    theApp.acc_ff[1]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeAccFfRh2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_ACC_FF_RH2,wBuf,20);
    theApp.acc_ff[2]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeAccFfRh3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_ACC_FF_RH3,wBuf,20);
    theApp.acc_ff[3]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeAccFfSl() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_ACC_FF_SL,wBuf,20);
    theApp.acc_ff[0]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeFriFfRh1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_FRI_FF_RH1,wBuf,20);
    theApp.fri_ff[1]=theApp.ReadDataChar(wBuf);	
}

void CParaWndDlg::OnChangeFriFfRh2() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_FRI_FF_RH2,wBuf,20);
    theApp.fri_ff[2]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeFriFfRh3() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_FRI_FF_RH3,wBuf,20);
    theApp.fri_ff[3]=theApp.ReadDataChar(wBuf);
}

void CParaWndDlg::OnChangeFriFfSl() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function to send the EM_SETEVENTMASK message to the control
	// with the ENM_CHANGE flag ORed into the lParam mask.
	
	// TODO: Add your control notification handler code here
    unsigned short wBuf[32];
	int i,j,sign;
	GetDlgItemText(IDC_FRI_FF_SL,wBuf,20);
    theApp.fri_ff[0]=theApp.ReadDataChar(wBuf);
}

⌨️ 快捷键说明

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