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

📄 inputdlg.cpp

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CInputDlg dialog


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

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


BEGIN_MESSAGE_MAP(CInputDlg, CDialog)
	//{{AFX_MSG_MAP(CInputDlg)
	ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CInputDlg message handlers

void CInputDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
		CRect rect,rect1,rect2,rect3;
	// TODO: Add your message handler code here
	GetClientRect(&rect);
	GetClientRect(&rect1);
	GetClientRect(&rect2);
	GetClientRect(&rect3);
	rect.bottom=rect.bottom-90;
	rect1.top=rect.bottom+30;
	rect1.bottom=rect1.bottom-30;
	rect1.left=150;
	rect1.right=rect1.left+260;
	rect2.top=rect1.top;
	rect2.bottom=rect1.bottom;
	rect2.left=rect1.right+20;
	rect2.right=rect2.left+100;
	rect3.top=rect1.top;
	rect3.bottom=rect1.bottom;
	rect3.left=20;
	rect3.right=rect1.left-20;
    CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	if(pEdit)
	{
	pEdit->MoveWindow(&rect);
	}
    CEdit *pEdit1 = (CEdit *)GetDlgItem(IDC_EDIT2);
	if(pEdit1)
	{
	pEdit1->MoveWindow(&rect1);
	}
	CButton *pButton = (CButton *)GetDlgItem(IDOK);
	if(pButton)
	{
	pButton->MoveWindow(&rect2);
	}
    CButton *pButton1 = (CButton *)GetDlgItem(IDC_BUTTON1);
	if(pButton)
	{
	pButton1->MoveWindow(&rect3);
	}

	//CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
	
}

int CInputDlg::GetData()
{
  return m_Edit2;
}

⌨️ 快捷键说明

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