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

📄 dlgproxy.cpp

📁 自己帮家里人写的一个废品收购管理数据库系统
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "废品收购管理系统.h"
#include "DlgProxy.h"
#include "废品收购管理系统Dlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyDlgAutoProxy

IMPLEMENT_DYNCREATE(CMyDlgAutoProxy, CCmdTarget)

CMyDlgAutoProxy::CMyDlgAutoProxy()
{
	EnableAutomation();
	
	// To keep the application running as long as an automation 
	//	object is active, the constructor calls AfxOleLockApp.
	AfxOleLockApp();

	// Get access to the dialog through the application's
	//  main window pointer.  Set the proxy's internal pointer
	//  to point to the dialog, and set the dialog's back pointer to
	//  this proxy.
	ASSERT (AfxGetApp()->m_pMainWnd != NULL);
	ASSERT_VALID (AfxGetApp()->m_pMainWnd);
	ASSERT_KINDOF(CMyDlg, AfxGetApp()->m_pMainWnd);
	m_pDialog = (CMyDlg*) AfxGetApp()->m_pMainWnd;
	m_pDialog->m_pAutoProxy = this;
}

CMyDlgAutoProxy::~CMyDlgAutoProxy()
{
	// To terminate the application when all objects created with
	// 	with automation, the destructor calls AfxOleUnlockApp.
	//  Among other things, this will destroy the main dialog
	if (m_pDialog != NULL)
		m_pDialog->m_pAutoProxy = NULL;
	AfxOleUnlockApp();
}

void CMyDlgAutoProxy::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.

	CCmdTarget::OnFinalRelease();
}

BEGIN_MESSAGE_MAP(CMyDlgAutoProxy, CCmdTarget)
	//{{AFX_MSG_MAP(CMyDlgAutoProxy)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

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

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

// {7D22DFE2-687B-4021-BC78-57FF018C603D}
static const IID IID_IMy =
{ 0x7d22dfe2, 0x687b, 0x4021, { 0xbc, 0x78, 0x57, 0xff, 0x1, 0x8c, 0x60, 0x3d } };

BEGIN_INTERFACE_MAP(CMyDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CMyDlgAutoProxy, IID_IMy, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {0594C2E5-FDB3-458B-9540-06D17A177D3E}
IMPLEMENT_OLECREATE2(CMyDlgAutoProxy, "My.Application", 0x594c2e5, 0xfdb3, 0x458b, 0x95, 0x40, 0x6, 0xd1, 0x7a, 0x17, 0x7d, 0x3e)

/////////////////////////////////////////////////////////////////////////////
// CMyDlgAutoProxy message handlers

⌨️ 快捷键说明

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