資源簡介
Visual C++開發實戰1200例(第2卷).(配書光盤附贈內容)
代碼片段和文件信息
//?bbb.cpp?:?Defines?the?class?behaviors?for?the?application.
//
/*************************************
版權所有:? 吉林省明日科技有限公司
完成日期: 2010-09-15
項目出處: 編程詞典
服務社區: www.mingribook.com
學習社區: www.mrbccd.com
*************************************/
#include?“stdafx.h“
#include?“bbb.h“
#include?“bbbDlg.h“
#include?“DlgLogin.h“
#include?“PrintDoc.h“
#include?“PrintFram.h“
#include?“PrintView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBbbApp
BEGIN_MESSAGE_MAP(CBbbApp?CWinApp)
//{{AFX_MSG_MAP(CBbbApp)
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBbbApp?construction
CBbbApp::CBbbApp()
{
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBbbApp?object
CBbbApp?theApp;
_ConnectionPtr?m_pCon;??//ADO連接對象
_RecordsetPtr?m_pRs;?
_RecordsetPtr?m_pRs1;
_CommandPtr?m_pCom;
BOOL?Flag?=?FALSE;?//登錄標識
CString?userpassword;//記錄當前用戶
CString?strserver;
CString?strdbName;
CString?strUser;
CString?strPassword;
CReport?report;
/////////////////////////////////////////////////////////////////////////////
//?CBbbApp?initialization
BOOL?CBbbApp::InitInstance()
{
AfxOleInit();?
AfxEnableControlContainer();
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
m_mainfram?=?NULL;
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CPrintDoc)
RUNTIME_CLASS(CPrintFram)???????//?main?SDI?frame?window
RUNTIME_CLASS(CPrintView));
AddDocTemplate(pDocTemplate);
IniAdo();
CDlgLogin?login?;
login.DoModal();
if?(Flag?==true)
{
CBbbDlg?dlg;
m_pMainWnd?=?&dlg;
dlg.DoModal();
}
return?FALSE;
}
CString?CBbbApp::ExtractFilePath(LPTSTR?filename)
{
CString?appname;
appname?=?AfxGetAppName();
appname?=?appname+“.exe“;
CString?temp;
int?pos;
temp?=?filename;
pos?=?temp.Find(appname0);
temp?=?temp.Left(pos);
return?temp;
}
void?CBbbApp::IniAdo()
{
try
{
CString?temp;
char?filepath[MAX_PATH];
GetModuleFileName(NULLfilepathMAX_PATH);
temp?=?theApp.ExtractFilePath(filepath);//獲取可執行文件的路徑
//m_pCon.CreateInstance(“ADODB.Connection“);
CString?strAdoConn;
char?temp1[100];
GetPrivateProfileString(“DatabaseConfig““Server“““temp1100temp+“login.ini“);
strserver?=?(TCHAR?*)temp1;
GetPrivateProfileString(“DatabaseConfig““Database“““temp1100temp+“login.ini“);
strdbName?=?temp1;
GetPrivateProfileString(“DatabaseConfig““User“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
????.CA....??????2564??2008-08-11?12:52??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案2\組件庫\WndDll\ReadMe.txt
????.CA....??????2577??2007-04-26?19:07??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案1\皮膚文件1\SkinOne\ReadMe.txt
????.CA....??????2577??2007-04-26?19:07??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案1\皮膚文件2\SkinTwo\ReadMe.txt
????.CA....??????3525??2006-02-28?13:54??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\圖書管理系統\源程序\ReadMe.txt
????.CA....??????3561??2008-07-24?13:08??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\Print\ReadMe.txt
????.CA....??????3579??2006-04-18?17:00??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\物資管理系統\wzglxt\ReadMe.txt
????.CA....??????3597??2008-06-13?08:26??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\桌面精靈模塊\Eidolon\ReadMe.txt
????.CA....??????3633??2008-08-11?12:50??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案2\ChangeWnd\ReadMe.txt
????.CA....??????3633??2008-06-25?09:07??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\屏幕錄像模塊\Kinescope\ReadMe.txt
????.CA....??????3651??2008-06-25?15:51??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\SQL數據庫提取器模塊\DistillSQL\ReadMe.txt
????.CA....??????3651??2008-08-09?13:07??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案1\ChangeSkin\ReadMe.txt
????.CA....?????82944??2008-09-09?10:37??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\SQL數據庫提取器模塊\程序使用說明.doc
????.CA....????130048??2008-09-23?10:29??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\程序使用說明.doc
????.CA....????195072??2008-09-19?10:39??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\屏幕錄像模塊\程序使用說明.doc
????.CA....????436736??2008-09-23?10:34??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\程序使用說明.doc
????.CA....????499200??2008-09-23?10:41??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\桌面精靈模塊\程序使用說明.doc
????.CA....????????88??2009-12-23?13:58??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\桌面精靈模塊\Eidolon\Eidolon.ini
????.CA....????????64??2006-02-28?13:54??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\圖書管理系統\源程序\Debug\Login.ini
????.CA....????????64??2006-02-28?13:54??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\圖書管理系統\源程序\Release\Login.ini
????.CA....??????1661??2010-09-15?16:11??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\Print\4Doc.h
????.CA....??????2060??2010-09-15?16:11??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\Print\4View.h
????.CA....??????1661??2010-09-15?16:11??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\Print\Accessdb.h
????.CA....??????1473??2010-09-15?15:59??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\界面換膚模塊\方案2\ChangeWnd\AddBookInfo.h
????.CA....???????875??2010-09-15?15:48??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\SQL數據庫提取器模塊\DistillSQL\ADO.h
????.CA....???????890??2010-09-15?16:11??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\萬能打印模塊\Print\ADO.h
????.CA....??????1722??2010-09-15?15:48??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\SQL數據庫提取器模塊\DistillSQL\AttachDlg.h
????.CA....??????1660??2010-09-15?15:45??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\桌面精靈模塊\Eidolon\AwokeDlg.h
????.CA....??????1682??2010-09-15?15:48??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\實用模塊\SQL數據庫提取器模塊\DistillSQL\BackUpDlg.h
????.CA....??????1602??2010-10-28?10:41??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\物資管理系統\wzglxt\ba
????.CA....??????1650??2010-10-28?10:41??Visual?C++開發實戰1200例(第2卷).(配書光盤附贈內容)\商業項目源碼\物資管理系統\wzglxt\ba
............此處省略1076個文件信息
評論
共有 條評論