利用MFC编写一个简单的带界面的数据库


利用MFC编写一个简单的带界面的数据库,要求至少能够简单地实现对数据的查找、修改、添加和删除功能。 ---------------------------------------------- 仅供参考
资源截图
代码片段和文件信息
// Database.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Database.h“
#include “DatabaseDlg.h“

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

/////////////////////////////////////////////////////////////////////////////
// CDatabaseApp

BEGIN_MESSAGE_MAP(CDatabaseApp CWinApp)
//{{AFX_MSG_MAP(CDatabaseApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDatabaseApp construction

CDatabaseApp::CDatabaseApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CDatabaseApp object

CDatabaseApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CDatabaseApp initialization

BOOL CDatabaseApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CDatabaseDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      36888  2010-09-01 21:06  DatabaseDatabase.aps

     文件       2211  2010-09-01 22:35  DatabaseDatabase.clw

     文件       2091  2010-08-20 15:23  DatabaseDatabase.cpp

     文件       4318  2010-08-31 16:35  DatabaseDatabase.dsp

     文件        522  2010-08-20 15:23  DatabaseDatabase.dsw

     文件       1346  2010-08-20 15:23  DatabaseDatabase.h

     文件      50176  2010-09-01 22:35  DatabaseDatabase.ncb

     文件      54784  2010-09-01 22:35  DatabaseDatabase.opt

     文件        558  2010-09-01 22:35  DatabaseDatabase.plg

     文件       7077  2010-09-01 21:06  DatabaseDatabase.rc

     文件      10986  2010-09-01 22:35  DatabaseDatabaseDlg.cpp

     文件       1680  2010-09-01 21:30  DatabaseDatabaseDlg.h

     文件     114759  2010-09-01 22:35  DatabaseDebugDatabase.exe

     文件     323096  2010-09-01 22:35  DatabaseDebugDatabase.ilk

     文件      14837  2010-09-01 21:48  DatabaseDebugDatabase.obj

     文件    5633608  2010-08-20 16:27  DatabaseDebugDatabase.pch

     文件     427008  2010-09-01 22:35  DatabaseDebugDatabase.pdb

     文件       3456  2010-09-01 21:06  DatabaseDebugDatabase.res

     文件      47448  2010-09-01 22:35  DatabaseDebugDatabaseDlg.obj

     文件     105859  2010-08-20 16:27  DatabaseDebugStdAfx.obj

     文件       8710  2010-09-01 22:28  DatabaseDebugStudent.obj

     文件       6134  2010-08-30 19:54  DatabaseDebugStu_Database.obj

     文件     214016  2010-09-01 22:35  DatabaseDebugvc60.idb

     文件     372736  2010-09-01 22:35  DatabaseDebugvc60.pdb

     文件       1388  2010-08-20 21:49  Databaseold fileStudent.cpp

     文件        939  2010-08-20 21:49  Databaseold fileStudent.h

     文件       1115  2010-08-20 22:00  Databaseold fileStu_Database.cpp

     文件        834  2010-08-20 21:32  Databaseold fileStu_Database.h

     文件       3615  2010-08-20 15:23  DatabaseReadMe.txt

     文件       1078  2010-08-20 15:23  Database
esDatabase.ico

............此处省略13个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)