📄 dlgproxy.cpp
字号:
//
// $Id: DlgProxy.cpp 9 2005-06-13 08:51:56Z wpc0756\Emmanuel $
//
// Copyright 2005 Emmanuel KARTMANN (emmanuel@kartmann.org)
//
#include "stdafx.h"
#include "WebReplay.h"
#include "DlgProxy.h"
#include "WebReplayDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CWebReplayDlgAutoProxy
IMPLEMENT_DYNCREATE(CWebReplayDlgAutoProxy, CCmdTarget)
CWebReplayDlgAutoProxy::CWebReplayDlgAutoProxy()
{
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(CWebReplayDlg, AfxGetApp()->m_pMainWnd);
m_pDialog = reinterpret_cast<CWebReplayDlg*>(AfxGetApp()->m_pMainWnd);
m_pDialog->m_pAutoProxy = this;
}
CWebReplayDlgAutoProxy::~CWebReplayDlgAutoProxy()
{
// 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 CWebReplayDlgAutoProxy::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(CWebReplayDlgAutoProxy, CCmdTarget)
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CWebReplayDlgAutoProxy, CCmdTarget)
END_DISPATCH_MAP()
// Note: we add support for IID_IWebReplay to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .IDL file.
// {06670E74-4D90-429C-80AB-26050DC558A8}
static const IID IID_IWebReplay =
{ 0x6670E74, 0x4D90, 0x429C, { 0x80, 0xAB, 0x26, 0x5, 0xD, 0xC5, 0x58, 0xA8 } };
BEGIN_INTERFACE_MAP(CWebReplayDlgAutoProxy, CCmdTarget)
INTERFACE_PART(CWebReplayDlgAutoProxy, IID_IWebReplay, Dispatch)
END_INTERFACE_MAP()
// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {6720C91D-6314-40E3-8B0E-8176FCEB129B}
IMPLEMENT_OLECREATE2(CWebReplayDlgAutoProxy, "WebReplay.Application", 0x6720c91d, 0x6314, 0x40e3, 0x8b, 0xe, 0x81, 0x76, 0xfc, 0xeb, 0x12, 0x9b)
// CWebReplayDlgAutoProxy message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -