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

📄 dlga.cpp

📁 生生世世 生生世世 生生世世 生生世世 搜索
💻 CPP
字号:
// DlgA.cpp : implementation file
//

#include "stdafx.h"
#include "finalhomework.h"
#include "DlgA.h"
#include "DlgB.h"
#include "DlgC.h"
#include "DlgD.h"
#include "DlgE.h"
#include "DlgEDisplay.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDlgA dialog


CDlgA::CDlgA()
	: CDialog(CDlgA::IDD)
{
	//{{AFX_DATA_INIT(CDlgA)
	m_password = _T("");
	m_adminstrator = _T("");
	m_selectjob = -1;
	//}}AFX_DATA_INIT
	FILE *fp;
	char temp[20];
	fp=fopen("Data1.dat","r");
	fscanf(fp,"%s",temp);
	m_adminstrator=temp;
	fscanf(fp,"%s",temp);
	m_password=temp;
	fclose(fp);
}


void CDlgA::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgA)
	DDX_Text(pDX, IDC_EPASSWORD, m_password);
	DDX_Text(pDX, IDC_EUSER, m_adminstrator);
	DDX_CBIndex(pDX, IDC_COMBOJOB, m_selectjob);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgA, CDialog)
	//{{AFX_MSG_MAP(CDlgA)
	ON_EN_CHANGE(IDC_EUSER, OnChangeEuser)
	ON_EN_CHANGE(IDC_EPASSWORD, OnChangeEpassword)
	ON_BN_CLICKED(IDC_SAVECHANGE, OnSavechange)
	ON_CBN_SELCHANGE(IDC_COMBOJOB, OnSelchangeCombojob)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgA message handlers

void CDlgA::OnChangeEuser() 
{
	// 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.
	
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
}

void CDlgA::OnChangeEpassword() 
{
	// 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.
	
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	
}

void CDlgA::OnSavechange() //更改管理员帐户密码
{
	// TODO: Add your control notification handler code here
	FILE *fp;
	fp=fopen("Data1.dat","w+");
	fputs(m_adminstrator,fp);
	fputc('\n',fp);
	fputs(m_password,fp);
	fclose(fp);
}



void CDlgA::OnSelchangeCombojob() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
//	DestroyWindow();
	CDlgEDisplay dlg(m_selectjob+1);
	dlg.DoModal();	
}

⌨️ 快捷键说明

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