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

📄 page3.cpp

📁 为VC初学者提供一个很好的例程
💻 CPP
字号:
// Page3.cpp : implementation file
//

#include "stdafx.h"
#include "cj.h"
#include "Page3.h"
#include  "StudentIfoManage.h"
#include  "StudentGradeManage.h"
#include "XibieManage.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPage3 property page

IMPLEMENT_DYNCREATE(CPage3, CPropertyPage)

CPage3::CPage3() : CPropertyPage(CPage3::IDD)
{
	//{{AFX_DATA_INIT(CPage3)
	//}}AFX_DATA_INIT
}

CPage3::~CPage3()
{
}

void CPage3::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPage3)
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPage3, CPropertyPage)
	//{{AFX_MSG_MAP(CPage3)
	ON_BN_CLICKED(IDC_About, OnAbout)
	ON_BN_CLICKED(IDC_cmdAdd, OncmdAdd)
	ON_BN_CLICKED(IDC_cmdDelet, OncmdDelet)
	ON_BN_CLICKED(IDC_cmdExamKemu, OncmdExamKemu)
	ON_BN_CLICKED(IDC_cmdModifPasswod, OncmdModifPasswod)
	ON_BN_CLICKED(IDC_cmdOffice, OncmdOffice)
	ON_BN_CLICKED(IDC_cmdStudentCourse, OncmdStudentCourse)
	ON_BN_CLICKED(IDC_cmdStudentIfo, OncmdStudentIfo)
	ON_BN_CLICKED(IDC_cmdTable, OncmdTable)
	ON_BN_CLICKED(IDC_cmdTeacher, OncmdTeacher)
	ON_BN_CLICKED(IDC_cmdXiBie_Claas, OncmdXiBieClaas)
	ON_BN_CLICKED(IDC_cmdXuejie_Xueqi, OncmdXuejieXueqi)
	ON_BN_CLICKED(IDC_cmdXueKeManage, OncmdXueKeManage)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPage3 message handlers

void CPage3::OnAbout() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdAdd() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdDelet() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdExamKemu() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdModifPasswod() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdOffice() 
{
CXibieManage XibieManageDlg;
XibieManageDlg.DoModal();
}

void CPage3::OncmdStudentCourse() 
{

 CStudentGradeManage StudentGradeManageDlg;
 StudentGradeManageDlg.DoModal();
	
}

void CPage3::OncmdStudentIfo() 
{
	CStudentIfoManage StudentIfoManageDlg;
    StudentIfoManageDlg.DoModal();
}

void CPage3::OncmdTable() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdTeacher() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdXiBieClaas() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdXuejieXueqi() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OncmdXueKeManage() 
{
	// TODO: Add your control notification handler code here
	
}

void CPage3::OnOK() 
{
	//卸载数据库
	SQLConfigDataSource(NULL,ODBC_REMOVE_DSN,
		"Microsoft Access Driver (*.mdb)",
		"DSN=student\0"
		"Description=student\0"
        "FileType=Access\0"
        "DBQ=.\\student.mdb\0"
		               );
    OnClose();//调用OnClose()函数:自定义消息函数
		
}

void CPage3::OnClose() 
{
	AfxGetMainWnd()->PostMessage(WM_CLOSE);//系统退出;	
	
	CPropertyPage::OnClose();
}

BOOL CPage3::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -