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

📄 otherdocpage.cpp

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

#include "stdafx.h"
#include "OtherDocPage.h"
#include "FileNewDlg.h"
#include "VisualJava.h"

#include "WorkSpace.h"


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

/////////////////////////////////////////////////////////////////////////////
// COtherDocPage property page

IMPLEMENT_DYNCREATE(COtherDocPage, CPropertyPage)

COtherDocPage::COtherDocPage() : CPropertyPage(COtherDocPage::IDD)
{
	//{{AFX_DATA_INIT(COtherDocPage)
		// NOTE: the ClassWizard will add member initialization here
	m_szpFileName = _T("");
	m_szpFilePath = _T("");
	m_szpCurProject = _T("");
	//}}AFX_DATA_INIT
}

COtherDocPage::~COtherDocPage()
{
}

void COtherDocPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COtherDocPage)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	DDX_Control(pDX, IDC_LIST_OTHER_DOC_OPTIONS, m_wndFileOptions);
	DDX_Text(pDX, IDC_EDIT_OTHER_DOC_FILENAME, m_szpFileName);
	DDX_Text(pDX, IDC_EDIT_FILE_DIR, m_szpFilePath);
	DDX_CBString(pDX, IDC_COMBO_PROJECTS, m_szpCurProject);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(COtherDocPage, CPropertyPage)
	//{{AFX_MSG_MAP(COtherDocPage)
		// NOTE: the ClassWizard will add message map macros here
	ON_BN_CLICKED(IDC_BROWSE_TO, OnBrowseTo)
	ON_EN_CHANGE(IDC_EDIT_OTHER_DOC_FILENAME,OnEditName)
    ON_EN_CHANGE(IDC_EDIT_FILE_DIR,OnEditDir)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COtherDocPage message handlers


BOOL COtherDocPage::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	m_fileOptionImgs.Create(IDB_OTHER_DOCS,10,1,RGB(255,0,0));
    m_wndFileOptions.SetImageList(&m_fileOptionImgs,LVSIL_SMALL);

	m_wndFileOptions.InsertItem(0,"Microsoft Excel Chart",0);
	m_wndFileOptions.InsertItem(1,"Microsoft Excel WorkSheet",0);
	m_wndFileOptions.InsertItem(2,"Microsoft Powerpoint Presentation",0);
	m_wndFileOptions.InsertItem(3,"Microsoft Word Document",0);

    if(CVisualJavaApp::m_pCurWorkSpace != NULL)
	{
	   CComboBox *pCombo = (CComboBox*)GetDlgItem(IDC_COMBO_PROJECTS);
	   CVisualJavaApp::m_pCurWorkSpace->FillCombo(pCombo);
	}
	else
	{
       GetDlgItem(IDC_COMBO_PROJECTS)->EnableWindow(FALSE);
	   GetDlgItem(IDC_CHECK_ADDTO_PROJECT)->EnableWindow(FALSE);
	}

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

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

void COtherDocPage::OnBrowseTo() 
{
	
}

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


void COtherDocPage::OnEditName()
{
  /*UpdateData(TRUE);
  m_szpFilePath =  m_szpBasePath;
  m_szpFilePath += m_szpFileName;
  UpdateData(FALSE);*/
}


void COtherDocPage::OnEditDir()
{
  /*UpdateData(TRUE);
  int npos = m_szpFilePath.Find(m_szpFileName);
  if(npos == -1)
  {
	m_szpBasePath = m_szpFilePath;
    m_szpBasePath += '\\';
  }
  else
  m_szpBasePath = m_szpFilePath.Left(npos);*/
  //m_szpBasePath = m_szpFilePath;
}

⌨️ 快捷键说明

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