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

📄 comdlg.cpp

📁 论文题目:基于数字信号处理器(DSP)的异步电机直接转矩控制研究 其中有软件的设计文档
💻 CPP
字号:
// Comdlg.cpp : implementation file
//

#include "stdafx.h"
#include "Dsp7.h"
#include "Comdlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CComdlg dialog


CComdlg::CComdlg(CWnd* pParent /*=NULL*/)
	: CDialog(CComdlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CComdlg)
	m_code = _T("");
	m_end = _T("");
	m_init = _T("");
	m_len = _T("");
	//}}AFX_DATA_INIT
}


void CComdlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CComdlg)
	DDX_Text(pDX, IDC_EDIT_CODE, m_code);
	DDV_MaxChars(pDX, m_code, 4);
	DDX_Text(pDX, IDC_EDIT_END, m_end);
	DDV_MaxChars(pDX, m_end, 4);
	DDX_Text(pDX, IDC_EDIT_INIT, m_init);
	DDV_MaxChars(pDX, m_init, 4);
	DDX_Text(pDX, IDC_EDIT_LEN, m_len);
	DDV_MaxChars(pDX, m_len, 4);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CComdlg, CDialog)
	//{{AFX_MSG_MAP(CComdlg)
	ON_EN_KILLFOCUS(IDC_EDIT_CODE, OnKillfocusEditCode)
	ON_EN_KILLFOCUS(IDC_EDIT_END, OnKillfocusEditEnd)
	ON_EN_KILLFOCUS(IDC_EDIT_INIT, OnKillfocusEditInit)
	ON_EN_KILLFOCUS(IDC_EDIT_LEN, OnKillfocusEditLen)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CComdlg message handlers

void CComdlg::OnKillfocusEditCode() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CString str;
	str=m_code;
	int len=str.GetLength();
	for(int i=0;i<len;i++)
		if(!isxdigit(str[i])){MessageBox("DATA ERROR!!!");break;}
	UpdateData(false);
	
}

void CComdlg::OnKillfocusEditEnd() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CString str;
	str=m_end;
	int len=str.GetLength();
	for(int i=0;i<len;i++)
		if(!isxdigit(str[i])){MessageBox("DATA ERROR!!!");break;}
	UpdateData(false);
	
}

void CComdlg::OnKillfocusEditInit() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CString str;
	str=m_init;
	int len=str.GetLength();
	for(int i=0;i<len;i++)
		if(!isxdigit(str[i])){MessageBox("DATA ERROR!!!");break;}
	UpdateData(false);
	
}

void CComdlg::OnKillfocusEditLen() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CString str;
	str=m_len;
	int len=str.GetLength();
	for(int i=0;i<len;i++)
		if(!isxdigit(str[i])){MessageBox("DATA ERROR!!!");break;}
	UpdateData(false);
	
}

⌨️ 快捷键说明

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