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

📄 input.cpp

📁 编译原理---正则表达式到DFA的演示程序
💻 CPP
字号:
// Input.cpp : implementation file
//

#include "stdafx.h"
#include "Regular.h"
#include "Input.h"

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

/////////////////////////////////////////////////////////////////////////////
// Input dialog


Input::Input(CWnd* pParent /*=NULL*/)
	: CDialog(Input::IDD, pParent)
{
	//{{AFX_DATA_INIT(Input)
	m_editExpression = _T("");
	//}}AFX_DATA_INIT
}


void Input::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Input)
	DDX_Text(pDX, IDC_EDIT_EXPRESSION, m_editExpression);
	DDV_MaxChars(pDX, m_editExpression, 255);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Input, CDialog)
	//{{AFX_MSG_MAP(Input)
	ON_EN_CHANGE(IDC_EDIT_EXPRESSION, OnChangeEditExpression)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Input message handlers

void Input::OnChangeEditExpression() 
{
	UpdateData(TRUE);
}

void Input::GetBufferData(char *buf)
{
	int len=m_editExpression.GetLength();
	for(int i=0;i<len;i++)
		buf[i]=(char)m_editExpression.GetAt(i);
}

int Input::GetLength()
{
	return m_editExpression.GetLength();
}

⌨️ 快捷键说明

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