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

📄 runresultdlg.cpp

📁 编译原理课程设计是用Microsoft Visual C++ 6.0编写。实现了语法词法及代码优化
💻 CPP
字号:
// RunResultDlg.cpp : implementation file
//

#include "stdafx.h"
#include "IMPUBasic语言程序设计器.h"
#include "RunResultDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CRunResultDlg dialog


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

CRunResultDlg::CRunResultDlg(CString c)
	: CDialog(CRunResultDlg::IDD, NULL)
{
	m_Edit1 = _T("");
	m_Edit1 = c;
}
void CRunResultDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRunResultDlg)
	DDX_Text(pDX, IDC_EDIT1, m_Edit1);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRunResultDlg, CDialog)
	//{{AFX_MSG_MAP(CRunResultDlg)
	ON_WM_SIZE()
	ON_COMMAND(IDD_EDIT1_CLS, OnEdit1Cls)
	ON_COMMAND(IDD_EDIT1_COPY, OnEdit1Copy)
	ON_COMMAND(IDD_EDIT1_PASTE, OnEdit1Paste)
	ON_COMMAND(IDD_EDIT1_QUIT, OnEdit1Quit)
	ON_COMMAND(IDD_EDIT1_SELALL, OnEdit1Selall)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRunResultDlg message handlers

void CRunResultDlg::PostNcDestroy() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CDialog::PostNcDestroy();
	delete this;
}

BOOL CRunResultDlg::Create()
{
  return CDialog::Create(CRunResultDlg::IDD);
}

void CRunResultDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	CRect rect;
	GetClientRect(&rect);
    CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	if(pEdit)
	{
	pEdit->MoveWindow(&rect);
	}
}

void CRunResultDlg::OnEdit1Cls() 
{
	// TODO: Add your command handler code here
	CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	pEdit->SetWindowText("");
	pEdit->EmptyUndoBuffer();
}

void CRunResultDlg::OnEdit1Copy() 
{
	// TODO: Add your command handler code here
	CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	pEdit->Copy();
	
}

void CRunResultDlg::OnEdit1Paste() 
{
	// TODO: Add your command handler code here
	CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	pEdit->Paste();
}

void CRunResultDlg::OnEdit1Quit() 
{
	// TODO: Add your command handler code here
	OnCancel();
}

void CRunResultDlg::OnEdit1Selall() 
{
	// TODO: Add your command handler code here
	CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	int nStart,nEnd;
	nStart=0;
	nEnd=pEdit->GetWindowTextLength();
	pEdit->SetSel(nStart,nEnd);
}

⌨️ 快捷键说明

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