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

📄 pathinputdlg.cpp

📁 刚上传内容的相关CODEC不能单独上传。于是
💻 CPP
字号:
// PathInputDlg.cpp : implementation file
//

#include "stdafx.h"
#include "magicscissors.h"
#include "PathInputDlg.h"
#include "DirDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPathInputDlg dialog


CPathInputDlg::CPathInputDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CPathInputDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPathInputDlg)
	m_strBase = _T("");
	m_strStereo = _T("");
	m_strLeft = _T("");
	m_strRight = _T("");
	m_strSeg = _T("");
	m_nFrame = 0;
	//}}AFX_DATA_INIT
}


void CPathInputDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPathInputDlg)
	DDX_Text(pDX, IDC_EDIT1, m_strBase);
	DDX_Text(pDX, IDC_EDIT2, m_strStereo);
	DDX_Text(pDX, IDC_EDIT3, m_strLeft);
	DDX_Text(pDX, IDC_EDIT4, m_strRight);
	DDX_Text(pDX, IDC_EDIT5, m_strSeg);
	DDX_Text(pDX, IDC_EDIT6, m_nFrame);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPathInputDlg, CDialog)
	//{{AFX_MSG_MAP(CPathInputDlg)
	ON_BN_CLICKED(IDC_SET_PATH, OnSetPath)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPathInputDlg message handlers

void CPathInputDlg::OnSetPath() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	CDirDialog dlg;
	dlg.m_strTitle = "版肺 汲沥";
	dlg.m_strSelDir = m_strBase;	
	CString tmp;
	int l;
	if( dlg.DoBrowse() == IDOK )
	{
		m_strBase = dlg.m_strPath;
		l = m_strStereo.ReverseFind('\\');
		tmp = m_strStereo.Left(l);
		l = tmp.ReverseFind('\\');
		tmp = tmp.Left(l);
		l = tmp.GetLength();
		m_strStereo = m_strStereo.Right(m_strStereo.GetLength()-l);
		m_strStereo = m_strBase + m_strStereo;

		l = m_strLeft.ReverseFind('\\');
		tmp = m_strLeft.Left(l);
		l = tmp.ReverseFind('\\');
		tmp = tmp.Left(l);
		l = tmp.GetLength();
		m_strLeft = m_strLeft.Right(m_strLeft.GetLength()-l);
		m_strLeft = m_strBase + m_strLeft;

		l = m_strRight.ReverseFind('\\');
		tmp = m_strRight.Left(l);
		l = tmp.ReverseFind('\\');
		tmp = tmp.Left(l);
		l = tmp.GetLength();
		m_strRight = m_strRight.Right(m_strRight.GetLength()-l);
		m_strRight = m_strBase + m_strRight;

		l = m_strSeg.ReverseFind('\\');
		tmp = m_strSeg.Left(l);
		l = tmp.ReverseFind('\\');
		tmp = tmp.Left(l);
		l = tmp.GetLength();
		m_strSeg = m_strSeg.Right(m_strSeg.GetLength()-l);
		m_strSeg = m_strBase + m_strSeg;

		UpdateData(FALSE);

	}

}

⌨️ 快捷键说明

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