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

📄 dlgproxy.cpp

📁 完整的MP3播放器源码
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "RichiMP3.h"
#include "DlgProxy.h"
#include "RichiMP3Dlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CRichiMP3DlgAutoProxy

IMPLEMENT_DYNCREATE(CRichiMP3DlgAutoProxy, CCmdTarget)

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

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

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

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

// {8EC207E8-0A66-11D1-95CB-0000E8713613}
static const IID IID_IRichiMP3 =
{ 0x8ec207e8, 0xa66, 0x11d1, { 0x95, 0xcb, 0x0, 0x0, 0xe8, 0x71, 0x36, 0x13 } };

BEGIN_INTERFACE_MAP(CRichiMP3DlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CRichiMP3DlgAutoProxy, IID_IRichiMP3, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {8EC207E6-0A66-11D1-95CB-0000E8713613}
IMPLEMENT_OLECREATE2(CRichiMP3DlgAutoProxy, "RichiMP3.Application", 0x8ec207e6, 0xa66, 0x11d1, 0x95, 0xcb, 0x0, 0x0, 0xe8, 0x71, 0x36, 0x13)

/////////////////////////////////////////////////////////////////////////////
// CRichiMP3DlgAutoProxy message handlers

⌨️ 快捷键说明

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