pathsec.cpp

来自「基于摄影测量学中FORNSTER算子」· C++ 代码 · 共 87 行

CPP
87
字号
// PathSec.cpp : implementation file
//

#include "stdafx.h"
#include "Match.h"
#include "PathSec.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPathSec dialog


CPathSec::CPathSec(CWnd* pParent /*=NULL*/)
	: CDialog(CPathSec::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPathSec)
	m_Path1 = _T("");
	m_Path2 = _T("");
	//}}AFX_DATA_INIT
}


void CPathSec::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPathSec)
	DDX_Text(pDX, IDC_EDITSRC, m_Path1);
	DDX_Text(pDX, IDC_EDITSER, m_Path2);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPathSec, CDialog)
	//{{AFX_MSG_MAP(CPathSec)
	ON_BN_CLICKED(IDC_BTNOPEN1, OnBtnopen1)
	ON_BN_CLICKED(IDC_BTNOPEN2, OnBtnopen2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPathSec message handlers

void CPathSec::OnBtnopen1() 
{
	// TODO: Add your control notification handler code here
	CFileDialog  dlg(true, NULL, NULL, NULL, "BMP文件(*.bmp)|*.bmp|所有文件(*.*)|*.*||",NULL);
	if ( dlg.DoModal() == IDOK )
	{
		m_Path1 = dlg.GetPathName();
		CEdit  *pEidt   =   (CEdit *)GetDlgItem(IDC_EDITSRC);
		pEidt->SetWindowText(m_Path1);
	}
	
}

void CPathSec::OnBtnopen2() 
{
	// TODO: Add your control notification handler code here
	CFileDialog  dlg(true, NULL, NULL, NULL, "BMP文件(*.bmp)|*.bmp|所有文件(*.*)|*.*||",NULL);
	if ( dlg.DoModal() == IDOK )
	{
		m_Path2 = dlg.GetPathName();
		CEdit  *pEidt   =   (CEdit *)GetDlgItem(IDC_EDITSER);
		pEidt->SetWindowText(m_Path2);
	}
	
}

void CPathSec::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
}

void CPathSec::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

⌨️ 快捷键说明

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