📄 searchpath.cpp
字号:
// SearchPath.cpp : implementation file
//
#include "stdafx.h"
#include "const.h"
#include "painted.h"
#include "paintobj.h"
#include "paintdoc.h"
#include "SearchPath.h"
#include "SearchNode.h"
#include "paintvw.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSearchPath dialog
CSearchPath::CSearchPath(CWnd* pParent)
: CDialog(CSearchPath::IDD, pParent)
{
//{{AFX_DATA_INIT(CSearchPath)
m_uPathId = 0;
//}}AFX_DATA_INIT
m_pParent = pParent;
m_nID = CSearchPath::IDD;
}
void CSearchPath::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSearchPath)
DDX_Text(pDX, IDC_PATHID, m_uPathId);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSearchPath, CDialog)
//{{AFX_MSG_MAP(CSearchPath)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSearchPath message handlers
BOOL CSearchPath::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::Create(IDD, pParentWnd);
}
BOOL CSearchPath::Create()
{
return CDialog::Create(m_nID, m_pParent);
}
void CSearchPath::OnOK()
{
// TODO: Add extra validation here
CEdit* pEdit = (CEdit*) GetDlgItem(IDC_PATHID);
CString str;
pEdit->GetWindowText(str);
//将字符串转换成浮点数
m_pDoc->m_uSearchPathId=atoi(str);//表示查找的路径Id号
((CPaintobjView*)m_pParent)->SearchPath();
//CDialog::OnOK();
}
void CSearchPath::OnCancel()
{
// TODO: Add extra cleanup here
((CPaintobjView*)m_pParent)->m_pSearchPath=NULL;
DestroyWindow();
//CDialog::OnCancel();
}
void CSearchPath::PostNcDestroy()
{
// TODO: Add your specialized code here and/or call the base class
delete this;
//CDialog::PostNcDestroy();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -