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

📄 projectnew.cpp

📁 类似vc的集成开发环境
💻 CPP
字号:
// ProjectNew.cpp : implementation file
//

#include "stdafx.h"
#include "c02ide.h"
#include "ProjectNew.h"

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

/////////////////////////////////////////////////////////////////////////////
// CProjectNew dialog


CProjectNew::CProjectNew(CWnd* pParent /*=NULL*/)
	: CDialog(CProjectNew::IDD, pParent)
{
	//{{AFX_DATA_INIT(CProjectNew)
	m_proname = _T("");
	//}}AFX_DATA_INIT
}


void CProjectNew::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CProjectNew)
	DDX_Text(pDX, IDC_EDIT1, m_proname);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CProjectNew, CDialog)
	//{{AFX_MSG_MAP(CProjectNew)
	ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CProjectNew message handlers

void CProjectNew::OnOK() 
{
	// TODO: Add extra validation here
 
	ProjectList *p_newpro;
	p_newpro=new ProjectList;
    p_newpro->str_projectname=s_proname;
	projectinfo.Add((CObject *)p_newpro);
	DestroyWindow ();
	m_pDocFile->UpdateTabView();
	m_pDocClass->UpdateTabView();

//	CDialog::OnOK();
}

BOOL CProjectNew::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	GetDlgItem(IDC_EDIT1)->SetFocus();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CProjectNew::OnChangeEdit1() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
		UpdateData();

    s_proname=m_proname;

 
	UpdateData(FALSE);	
	// TODO: Add your control notification handler code here
	
}

⌨️ 快捷键说明

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