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

📄 directorydlg.cpp

📁 商业测绘软件
💻 CPP
字号:
// DirectoryDlg.cpp : implementation file
//

#include "stdafx.h"
#include "DeformAdj.h"
#include "DirectoryDlg.h"
#include "ViewDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDirectoryDlg dialog


CDirectoryDlg::CDirectoryDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDirectoryDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDirectoryDlg)
	m_DireEdit = _T("");
	m_ProjName = _T("");
	//}}AFX_DATA_INIT
}


void CDirectoryDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDirectoryDlg)
	DDX_Text(pDX, IDC_DIRECTORY_EDIT, m_DireEdit);
	DDX_Text(pDX, IDC_PROCNAME_EDIT, m_ProjName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDirectoryDlg, CDialog)
	//{{AFX_MSG_MAP(CDirectoryDlg)
	ON_EN_CHANGE(IDC_DIRECTORY_EDIT, OnChangeDirectoryEdit)
	ON_EN_CHANGE(IDC_PROCNAME_EDIT, OnChangeProcnameEdit)
	ON_BN_CLICKED(IDC_VIEW_BUTTON, OnViewButton)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDirectoryDlg message handlers

void CDirectoryDlg::OnChangeDirectoryEdit() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	UpdateData(true);
}

void CDirectoryDlg::OnChangeProcnameEdit() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	
	// TODO: Add your control notification handler code here
	UpdateData(true);
}

void CDirectoryDlg::OnViewButton() 
{
	// TODO: Add your control notification handler code here
	CViewDlg dlg;
	if ( dlg.DoModal() == IDOK )
	{
		m_DireEdit = dlg.strdire;
		UpdateData(false);
	}
}

void CDirectoryDlg::OnOK() 
{
	// TODO: Add extra validation here
	if (m_DireEdit=="")
	{
		AfxMessageBox("请输入工程目录!");
		return;
	}
	if (m_ProjName=="")
	{
		AfxMessageBox("请输入工程文件名!");
		return;
	}
	int length1=m_DireEdit.Find(" ");
	if (length1>=0)
	{
		AfxMessageBox("非法的目录名,请重新输入!");
		return;
	}
	int length2=m_ProjName.Find(" ");
	if (length2>=0)
	{
		AfxMessageBox("非法的文件名,请重新输入!");
		return;
	}
	CDialog::OnOK();
}

⌨️ 快捷键说明

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