resultdlg.cpp

来自「当你写词法分析器时」· C++ 代码 · 共 65 行

CPP
65
字号
// ResultDlg.cpp : implementation file
//

#include "stdafx.h"
#include "zscpascal.h"
#include "ResultDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CResultDlg dialog


CResultDlg::CResultDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CResultDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CResultDlg)
	//}}AFX_DATA_INIT
}


void CResultDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CResultDlg)
	DDX_Control(pDX, IDC_RESULT_EDIT, m_ResultEditCtrl);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CResultDlg message handlers

////////////////////////////////////////////////
//  Initialize the text in the dialog

BOOL CResultDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	CString text;
	// TODO: Add extra initialization here
	m_ResultEditCtrl.SetWindowText(_T(""));
	int val;
	do 
	{
		val = m_pAnalizer->NextToken();
		CString str;
		str.Format("Atom Code :%d - Value :%s \r\n", val, m_pAnalizer->GetStrValue());
		text += str;
	}
	while (val != TT_EOF);
	m_ResultEditCtrl.SetWindowText(text);
	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 + =
减小字号Ctrl + -
显示快捷键?