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

📄 mydlgdelother.cpp

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

#include "stdafx.h"
#include "myprinter.h"
#include "MyDlgDelOther.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelOther property page

IMPLEMENT_DYNCREATE(CMyDlgDelOther, CPropertyPage)

CMyDlgDelOther::CMyDlgDelOther() : CPropertyPage(CMyDlgDelOther::IDD)
{
	EnableAutomation();
	//{{AFX_DATA_INIT(CMyDlgDelOther)
		// 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初始化错误!");

	}
}

CMyDlgDelOther::~CMyDlgDelOther()
{
}

void CMyDlgDelOther::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 CMyDlgDelOther::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyDlgDelOther)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


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

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

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

// {EA7F78F0-E9BA-4755-BD9F-67C224EF4436}
static const IID IID_IMyDlgDelOther =
{ 0xea7f78f0, 0xe9ba, 0x4755, { 0xbd, 0x9f, 0x67, 0xc2, 0x24, 0xef, 0x44, 0x36 } };

BEGIN_INTERFACE_MAP(CMyDlgDelOther, CPropertyPage)
	INTERFACE_PART(CMyDlgDelOther, IID_IMyDlgDelOther, Dispatch)
END_INTERFACE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelOther message handlers

⌨️ 快捷键说明

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