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

📄 dlgproxy.cpp

📁 chat程序
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "ChatRoom.h"
#include "DlgProxy.h"
#include "ChatRoomDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CChatRoomDlgAutoProxy

IMPLEMENT_DYNCREATE(CChatRoomDlgAutoProxy, CCmdTarget)

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

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

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

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

// {6578D590-F939-46EA-94FE-A49678C6886D}
static const IID IID_IChatRoom =
{ 0x6578d590, 0xf939, 0x46ea, { 0x94, 0xfe, 0xa4, 0x96, 0x78, 0xc6, 0x88, 0x6d } };

BEGIN_INTERFACE_MAP(CChatRoomDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CChatRoomDlgAutoProxy, IID_IChatRoom, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {35CD00D1-FE33-446A-9A24-2D2CB7A22705}
IMPLEMENT_OLECREATE2(CChatRoomDlgAutoProxy, "ChatRoom.Application", 0x35cd00d1, 0xfe33, 0x446a, 0x9a, 0x24, 0x2d, 0x2c, 0xb7, 0xa2, 0x27, 0x5)

/////////////////////////////////////////////////////////////////////////////
// CChatRoomDlgAutoProxy message handlers

⌨️ 快捷键说明

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