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

📄 dlgproxy.cpp

📁 随着计算机信息技术的飞速发展
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "MediaServer.h"
#include "DlgProxy.h"
#include "MediaServerDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMediaServerDlgAutoProxy

IMPLEMENT_DYNCREATE(CMediaServerDlgAutoProxy, CCmdTarget)

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

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

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

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

// {B15167EE-4291-4B05-AEB6-52EADF53E768}
static const IID IID_IMediaServer =
{ 0xb15167ee, 0x4291, 0x4b05, { 0xae, 0xb6, 0x52, 0xea, 0xdf, 0x53, 0xe7, 0x68 } };

BEGIN_INTERFACE_MAP(CMediaServerDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CMediaServerDlgAutoProxy, IID_IMediaServer, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {7D6042CA-97F0-475A-8434-F6E35121B803}
IMPLEMENT_OLECREATE2(CMediaServerDlgAutoProxy, "MediaServer.Application", 0x7d6042ca, 0x97f0, 0x475a, 0x84, 0x34, 0xf6, 0xe3, 0x51, 0x21, 0xb8, 0x3)

/////////////////////////////////////////////////////////////////////////////
// CMediaServerDlgAutoProxy message handlers

⌨️ 快捷键说明

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