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

📄 newworkspcpage.cpp

📁 用bcg库编写的java IDE 源码
💻 CPP
字号:
// NewWorkspcPage.cpp : implementation file
//

#include "stdafx.h"
#include "NewWorkspcPage.h"
#include "FileNewDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CNewWorkspcPage property page

IMPLEMENT_DYNCREATE(CNewWorkspcPage, CPropertyPage)

CNewWorkspcPage::CNewWorkspcPage() : CPropertyPage(CNewWorkspcPage::IDD)
{
	//{{AFX_DATA_INIT(CNewWorkspcPage)
	m_szpWorkSpcPath = _T("");
	m_szpWorkSpcName = _T("");
	//}}AFX_DATA_INIT
}

CNewWorkspcPage::~CNewWorkspcPage()
{
}

void CNewWorkspcPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CNewWorkspcPage)
	DDX_Control(pDX, IDC_LIST_WORKSPC_OPTIONS, m_wndWorkSpcOptions);
	DDX_Text(pDX, IDC_EDIT_WORKSPC_DIR, m_szpWorkSpcPath);
	DDX_Text(pDX, IDC_EDIT_WORKSPC_NAME, m_szpWorkSpcName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CNewWorkspcPage, CPropertyPage)
	//{{AFX_MSG_MAP(CNewWorkspcPage)
	ON_EN_CHANGE(IDC_EDIT_WORKSPC_NAME,OnEditName)
    ON_EN_CHANGE(IDC_EDIT_WORKSPC_DIR,OnEditDir)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNewWorkspcPage message handlers

BOOL CNewWorkspcPage::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
    m_workSpcImg.Create(16,16,ILC_COLOR24|ILC_MASK,7,2);	
	CBitmap bm;
    bm.LoadBitmap(IDB_FILE_BUNDLE);
	m_workSpcImg.Add(&bm,RGB(255,0,255));

    m_wndWorkSpcOptions.SetImageList(&m_workSpcImg,LVSIL_SMALL);
	m_wndWorkSpcOptions.InsertItem(0,"Empty WorkSpace",0);

	m_szpWorkSpcPath = _T("C:\\My Documents\\");
	UpdateData(FALSE);
	m_szpBasePath = m_szpWorkSpcPath;

	m_wndBrowse.SubclassDlgItem(IDC_BROWSE_TO,this);
	return TRUE;  
}

BOOL CNewWorkspcPage::OnSetActive()
{
	if(CFileNewDlg::m_pTemp != NULL)
	{
      CFileNewDlg* psheet = (CFileNewDlg*)GetParent();
	  psheet->RemovePage(CFileNewDlg::m_pTemp);
	  CFileNewDlg::m_pTemp = NULL;
	}
	return CPropertyPage::OnSetActive();
}


void CNewWorkspcPage::OnEditName()
{
  /*UpdateData(TRUE);
  m_szpWorkSpcPath =  m_szpBasePath;
  m_szpWorkSpcPath += m_szpWorkSpcName;
  UpdateData(FALSE);*/
}
void CNewWorkspcPage::OnEditDir()
{
  /*UpdateData(TRUE);
  m_szpBasePath = m_szpWorkSpcPath;*/
}

⌨️ 快捷键说明

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