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

📄 programdlg.cpp

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

#include "stdafx.h"
#include "Dsp7.h"
#include "Programdlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CProgramdlg dialog


CProgramdlg::CProgramdlg(CWnd* pParent /*=NULL*/)
	: CDialog(CProgramdlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CProgramdlg)
	m_program = _T("");
	m_pcode = _T("");
	//}}AFX_DATA_INIT
}


void CProgramdlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CProgramdlg)
	DDX_Text(pDX, IDC_EDIT_PROGRAM, m_program);
	DDV_MaxChars(pDX, m_program, 4);
	DDX_Text(pDX, IDC_EDIT_PCODE, m_pcode);
	DDV_MaxChars(pDX, m_pcode, 4);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CProgramdlg, CDialog)
	//{{AFX_MSG_MAP(CProgramdlg)
	ON_EN_KILLFOCUS(IDC_EDIT_PCODE, OnKillfocusEditPcode)
	ON_EN_KILLFOCUS(IDC_EDIT_PROGRAM, OnKillfocusEditProgram)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProgramdlg message handlers

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

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

BOOL CProgramdlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_program="9000";
	UpdateData(FALSE);
	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 + -