📄 dlgproxy.cpp
字号:
// DlgProxy.cpp : implementation file
//
#include "stdafx.h"
#include "BlueTTS.h"
#include "DlgProxy.h"
#include "BlueTTSDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBlueTTSDlgAutoProxy
IMPLEMENT_DYNCREATE(CBlueTTSDlgAutoProxy, CCmdTarget)
CBlueTTSDlgAutoProxy::CBlueTTSDlgAutoProxy()
{
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(CBlueTTSDlg, AfxGetApp()->m_pMainWnd);
m_pDialog = (CBlueTTSDlg*) AfxGetApp()->m_pMainWnd;
m_pDialog->m_pAutoProxy = this;
}
CBlueTTSDlgAutoProxy::~CBlueTTSDlgAutoProxy()
{
// 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 CBlueTTSDlgAutoProxy::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(CBlueTTSDlgAutoProxy, CCmdTarget)
//{{AFX_MSG_MAP(CBlueTTSDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CBlueTTSDlgAutoProxy, CCmdTarget)
//{{AFX_DISPATCH_MAP(CBlueTTSDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IBlueTTS to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {067A5752-43A9-4588-A6A4-50DAC08BA9BE}
static const IID IID_IBlueTTS =
{ 0x67a5752, 0x43a9, 0x4588, { 0xa6, 0xa4, 0x50, 0xda, 0xc0, 0x8b, 0xa9, 0xbe } };
BEGIN_INTERFACE_MAP(CBlueTTSDlgAutoProxy, CCmdTarget)
INTERFACE_PART(CBlueTTSDlgAutoProxy, IID_IBlueTTS, Dispatch)
END_INTERFACE_MAP()
// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {36441365-33C3-423D-9CFE-E48DDBEBE91A}
IMPLEMENT_OLECREATE2(CBlueTTSDlgAutoProxy, "BlueTTS.Application", 0x36441365, 0x33c3, 0x423d, 0x9c, 0xfe, 0xe4, 0x8d, 0xdb, 0xeb, 0xe9, 0x1a)
/////////////////////////////////////////////////////////////////////////////
// CBlueTTSDlgAutoProxy message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -