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

📄 startdlg.cpp

📁 本软件实现了模拟cpu的基本工作原理和工作过程
💻 CPP
字号:
// STARTDLG.cpp : implementation file
//

#include "stdafx.h"
#include "AM.h"
#include "STARTDLG.h"

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

/////////////////////////////////////////////////////////////////////////////
// STARTDLG dialog


STARTDLG::STARTDLG(CWnd* pParent /*=NULL*/)
	: CDialog(STARTDLG::IDD, pParent)
{
	//{{AFX_DATA_INIT(STARTDLG)
	m_startpoint = _T("");
	m_title = _T("");
	//}}AFX_DATA_INIT
}


void STARTDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(STARTDLG)
	DDX_Text(pDX, IDC_STARTPOINT_EDIT, m_startpoint);
	DDV_MaxChars(pDX, m_startpoint, 4);
	DDX_Text(pDX, IDC_TITTLE_EDIT, m_title);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(STARTDLG, CDialog)
	//{{AFX_MSG_MAP(STARTDLG)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// STARTDLG message handlers

void STARTDLG::OnOK() 
{
	UpdateData(true);
	m_startpoint.MakeUpper();
	if(m_startpoint.GetLength()<4){
		AfxMessageBox("起始地址有误,请重新输入!\n\n格式要求:4位16进制数");
		return;
	}
	char temp[10];
	strcpy(temp,m_startpoint);
	for(int i=0;i<4;i++){
		if(temp[i]<'0'||(temp[i]>'9' && temp[i]<'A')||temp[i]>'F'){
			AfxMessageBox("起始地址有误,请重新输入!\n\n格式要求:4位16进制数");
			return;
		}
	}
	CDialog::OnOK();
}

⌨️ 快捷键说明

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