changeapply.cpp

来自「偶作的毕业设计程序」· C++ 代码 · 共 81 行

CPP
81
字号
// ChangeApply.cpp : implementation file
//

#include "stdafx.h"
#include "SoftDocSystem.h"
#include "ChangeApply.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChangeApply dialog
extern CSoftDocSystemApp theApp;

CChangeApply::CChangeApply(CWnd* pParent /*=NULL*/)
	: CDialog(CChangeApply::IDD, pParent)
{
	//{{AFX_DATA_INIT(CChangeApply)
	m_SoftName = _T("");
	m_SoftNumber = _T("");
	m_SoftType = _T("");
	m_Geshi = _T("");
	//}}AFX_DATA_INIT
}


void CChangeApply::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CChangeApply)
	DDX_Control(pDX, IDC_COMBO1, m_GeshiCtrl);
	DDX_Text(pDX, IDC_EDIT1, m_SoftName);
	DDX_Text(pDX, IDC_EDIT2, m_SoftNumber);
	DDX_Text(pDX, IDC_EDIT3, m_SoftType);
	DDX_CBString(pDX, IDC_COMBO1, m_Geshi);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CChangeApply, CDialog)
	//{{AFX_MSG_MAP(CChangeApply)
	ON_BN_CLICKED(IDC_OK, OnOk)
	ON_BN_CLICKED(IDC_CANCEL, OnCancel)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChangeApply message handlers

void CChangeApply::OnOk() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	if(m_Geshi.IsEmpty()){AfxMessageBox("你没有输入正确的格式,请重新输入!");return;}
	theApp.mSoftGeshi =m_Geshi;
	CDialog::OnOK();
}

void CChangeApply::OnCancel() 
{
	// TODO: Add your control notification handler code here
	CDialog::OnCancel();
}

BOOL CChangeApply::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
m_SoftType=theApp.mSoftType ;
m_SoftNumber=theApp.mSoftNumber;
m_SoftName=theApp.mSoftName;
m_Geshi=theApp.mSoftGeshi ;
UpdateData(false);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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