资源简介
MFC利用ADO类连接ACCESS进行操作,内附源码,有详细的中文释义。适合新手以及不会操作ACCESS的程序员。可以说,看懂此代码,就会ACCESS了,下了绝对不会后悔。
代码片段和文件信息
// AccessTest.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “AccessTest.h“
#include “AccessTestDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAccessTestApp
BEGIN_MESSAGE_MAP(CAccessTestApp CWinAppEx)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()
// CAccessTestApp construction
CAccessTestApp::CAccessTestApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
// The one and only CAccessTestApp object
CAccessTestApp theApp;
// CAccessTestApp initialization
BOOL CAccessTestApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise any window creation will fail.
AfxOleInit();
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinAppEx::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
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
CAccessTestDlg dlg;
m_pMainWnd = &dlg;
INT_PTR 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;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-05-30 11:53 AccessTest\
目录 0 2015-05-30 11:53 AccessTest\AccessTest\
文件 2160 2015-05-28 14:47 AccessTest\AccessTest\AccessTest.cpp
文件 532 2015-05-28 11:57 AccessTest\AccessTest\AccessTest.h
文件 6797 2015-05-30 11:09 AccessTest\AccessTest\AccessTest.rc
文件 5530 2015-05-28 14:08 AccessTest\AccessTest\AccessTest.vcproj
文件 1409 2015-05-30 11:53 AccessTest\AccessTest\AccessTest.vcproj.YGF-PC.YGF.user
文件 11549 2015-05-30 11:49 AccessTest\AccessTest\AccessTestDlg.cpp
文件 911 2015-05-30 11:03 AccessTest\AccessTest\AccessTestDlg.h
文件 794624 2015-05-30 11:27 AccessTest\AccessTest\DB.accdb
文件 4296 2015-05-28 11:57 AccessTest\AccessTest\ReadMe.txt
目录 0 2015-05-30 11:30 AccessTest\AccessTest\res\
文件 67777 2007-11-28 16:21 AccessTest\AccessTest\res\AccessTest.ico
文件 401 2015-05-28 11:57 AccessTest\AccessTest\res\AccessTest.rc2
文件 1142 2015-05-30 11:03 AccessTest\AccessTest\resource.h
文件 212 2015-05-28 11:57 AccessTest\AccessTest\stdafx.cpp
文件 2127 2015-05-28 14:58 AccessTest\AccessTest\stdafx.h
文件 1432 2015-05-28 11:57 AccessTest\AccessTest\targetver.h
文件 896 2015-05-28 11:57 AccessTest\AccessTest.sln
文件 36864 2015-05-30 11:53 AccessTest\AccessTest.suo
- 上一篇:影碟出租系统C++源代码
- 下一篇:MFC控件重绘大全
评论
共有 条评论