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

📄 dlgproxy.cpp

📁 这是采用mfc编写的工资管理系统
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "SalaryManagement.h"
#include "DlgProxy.h"
#include "SalaryManagementDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSalaryManagementDlgAutoProxy

IMPLEMENT_DYNCREATE(CSalaryManagementDlgAutoProxy, CCmdTarget)

CSalaryManagementDlgAutoProxy::CSalaryManagementDlgAutoProxy()
{
	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(CSalaryManagementDlg, AfxGetApp()->m_pMainWnd);
	m_pDialog = (CSalaryManagementDlg*) AfxGetApp()->m_pMainWnd;
	m_pDialog->m_pAutoProxy = this;
}

CSalaryManagementDlgAutoProxy::~CSalaryManagementDlgAutoProxy()
{
	// 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 CSalaryManagementDlgAutoProxy::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(CSalaryManagementDlgAutoProxy, CCmdTarget)
	//{{AFX_MSG_MAP(CSalaryManagementDlgAutoProxy)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

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

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

// {0EC4F20C-EB6F-468C-96C0-AA3FEF9D83D4}
static const IID IID_ISalaryManagement =
{ 0xec4f20c, 0xeb6f, 0x468c, { 0x96, 0xc0, 0xaa, 0x3f, 0xef, 0x9d, 0x83, 0xd4 } };

BEGIN_INTERFACE_MAP(CSalaryManagementDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CSalaryManagementDlgAutoProxy, IID_ISalaryManagement, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {3B81CDB7-8E29-403C-B46C-E8ECEEF1A64D}
IMPLEMENT_OLECREATE2(CSalaryManagementDlgAutoProxy, "SalaryManagement.Application", 0x3b81cdb7, 0x8e29, 0x403c, 0xb4, 0x6c, 0xe8, 0xec, 0xee, 0xf1, 0xa6, 0x4d)

/////////////////////////////////////////////////////////////////////////////
// CSalaryManagementDlgAutoProxy message handlers

⌨️ 快捷键说明

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