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

📄 mydlgdelplant.cpp

📁 从列表进行打印的源码,请大家下载参考对照,从中发表意见,加深修改.
💻 CPP
字号:
// MyDlgDelPlant.cpp : implementation file
//

#include "stdafx.h"
#include "myprinter.h"
#include "MyDlgDelPlant.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelPlant property page

IMPLEMENT_DYNCREATE(CMyDlgDelPlant, CPropertyPage)

CMyDlgDelPlant::CMyDlgDelPlant() : CPropertyPage(CMyDlgDelPlant::IDD)
{
	EnableAutomation();
	//{{AFX_DATA_INIT(CMyDlgDelPlant)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	HRESULT hr;
	//初始化连接指针
	CoInitialize(NULL);
	hr=p_connection.CreateInstance(_uuidof(Connection));
	if(FAILED(hr))
	{
		CWnd::MessageBox ("_ConnectionPtr初始化错误!");
	
	}
	
   //初始化recordset指针
	hr=p_recordset.CreateInstance(_uuidof(Recordset));
	if(FAILED(hr))
	{
		CWnd::MessageBox ("_RecordsetPtr初始化错误!");

	}
}

CMyDlgDelPlant::~CMyDlgDelPlant()
{
}

void CMyDlgDelPlant::OnFinalRelease()
{
	// When the last reference for an automation object is released
	// OnFinalRelease is called.  The base class will automatically
	// deletes the object.  Add additional cleanup required for your
	// object before calling the base class.

	CPropertyPage::OnFinalRelease();
}

void CMyDlgDelPlant::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyDlgDelPlant)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyDlgDelPlant, CPropertyPage)
	//{{AFX_MSG_MAP(CMyDlgDelPlant)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CMyDlgDelPlant, CPropertyPage)
	//{{AFX_DISPATCH_MAP(CMyDlgDelPlant)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()

// Note: we add support for IID_IMyDlgDelPlant to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .ODL file.

// {6359970A-A327-44B3-9F90-995609FE9F72}
static const IID IID_IMyDlgDelPlant =
{ 0x6359970a, 0xa327, 0x44b3, { 0x9f, 0x90, 0x99, 0x56, 0x9, 0xfe, 0x9f, 0x72 } };

BEGIN_INTERFACE_MAP(CMyDlgDelPlant, CPropertyPage)
	INTERFACE_PART(CMyDlgDelPlant, IID_IMyDlgDelPlant, Dispatch)
END_INTERFACE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelPlant message handlers

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -