www.gusucode.com > ADO智能开发包C++源码程序 > ADO智能开发包/sfxdb_src_1.0.510.1/sfx/Examples/AdoControl/AdoControl.cpp

    /*******************************************************

《ADO智能组件》演示程序

版权所有(c) 2004-2005 许松森保留所有权力。 

有关最新信息请访问 http://www.willspace.net 站	

点,电子信箱 ytf1978#163.com(#号换为@号)

********************************************************/


#include "stdafx.h"
#include "TestMainDlg.h"
#include "AdoControl.h"

//#include "ADODB.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CAdoControlApp

BEGIN_MESSAGE_MAP(CAdoControlApp, CWinApp)
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()


CAdoControlApp::CAdoControlApp()
{
}

CAdoControlApp theApp;


BOOL CAdoControlApp::InitInstance()
{
	InitCommonControls();
	AfxInitRichEdit();
	
	CWinApp::InitInstance();
	VERIFY(RegAdoControl());		//这个方法一定要加入。

	AfxEnableControlContainer();

	SetRegistryKey(_T("应用程序向导生成的本地应用程序"));

	CTestMainDlg dlg;
	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
	}
	else if (nResponse == IDCANCEL)
	{
	}

	return FALSE;
}