📄 dlgproxy.cpp
字号:
// DlgProxy.cpp : implementation file
//
#include "stdafx.h"
#include "RealTimeStock.h"
#include "DlgProxy.h"
#include "RealTimeStockDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRealTimeStockDlgAutoProxy
IMPLEMENT_DYNCREATE(CRealTimeStockDlgAutoProxy, CCmdTarget)
CRealTimeStockDlgAutoProxy::CRealTimeStockDlgAutoProxy()
{
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(CRealTimeStockDlg, AfxGetApp()->m_pMainWnd);
m_pDialog = (CRealTimeStockDlg*) AfxGetApp()->m_pMainWnd;
m_pDialog->m_pAutoProxy = this;
}
CRealTimeStockDlgAutoProxy::~CRealTimeStockDlgAutoProxy()
{
// 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 CRealTimeStockDlgAutoProxy::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(CRealTimeStockDlgAutoProxy, CCmdTarget)
//{{AFX_MSG_MAP(CRealTimeStockDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CRealTimeStockDlgAutoProxy, CCmdTarget)
//{{AFX_DISPATCH_MAP(CRealTimeStockDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IRealTimeStock to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {A3FBF345-189D-11D5-B9C2-0008C79A1CDA}
static const IID IID_IRealTimeStock =
{ 0xa3fbf345, 0x189d, 0x11d5, { 0xb9, 0xc2, 0x0, 0x8, 0xc7, 0x9a, 0x1c, 0xda } };
BEGIN_INTERFACE_MAP(CRealTimeStockDlgAutoProxy, CCmdTarget)
INTERFACE_PART(CRealTimeStockDlgAutoProxy, IID_IRealTimeStock, Dispatch)
END_INTERFACE_MAP()
// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {A3FBF343-189D-11D5-B9C2-0008C79A1CDA}
IMPLEMENT_OLECREATE2(CRealTimeStockDlgAutoProxy, "RealTimeStock.Application", 0xa3fbf343, 0x189d, 0x11d5, 0xb9, 0xc2, 0x0, 0x8, 0xc7, 0x9a, 0x1c, 0xda)
/////////////////////////////////////////////////////////////////////////////
// CRealTimeStockDlgAutoProxy message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -