// DlgProxy.cpp : implementation file
//
#include "stdafx.h"
#include "Image Semantics.h"
#include "DlgProxy.h"
#include "Image SemanticsDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CImageSemanticsDlgAutoProxy
IMPLEMENT_DYNCREATE(CImageSemanticsDlgAutoProxy, CCmdTarget)
CImageSemanticsDlgAutoProxy::CImageSemanticsDlgAutoProxy()
{
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(CImageSemanticsDlg, AfxGetApp()->m_pMainWnd);
m_pDialog = (CImageSemanticsDlg*) AfxGetApp()->m_pMainWnd;
m_pDialog->m_pAutoProxy = this;
}
CImageSemanticsDlgAutoProxy::~CImageSemanticsDlgAutoProxy()
{
// 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 CImageSemanticsDlgAutoProxy::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(CImageSemanticsDlgAutoProxy, CCmdTarget)
//{{AFX_MSG_MAP(CImageSemanticsDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CImageSemanticsDlgAutoProxy, CCmdTarget)
//{{AFX_DISPATCH_MAP(CImageSemanticsDlgAutoProxy)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IImageSemantics to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {A494E54A-CA20-4441-A794-FD5C07E809CD}
static const IID IID_IImageSemantics =
{ 0xa494e54a, 0xca20, 0x4441, { 0xa7, 0x94, 0xfd, 0x5c, 0x7, 0xe8, 0x9, 0xcd } };
BEGIN_INTERFACE_MAP(CImageSemanticsDlgAutoProxy, CCmdTarget)
INTERFACE_PART(CImageSemanticsDlgAutoProxy, IID_IImageSemantics, Dispatch)
END_INTERFACE_MAP()
// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {1F242C20-4FEB-49AC-8F26-2259D660D8D5}
IMPLEMENT_OLECREATE2(CImageSemanticsDlgAutoProxy, "ImageSemantics.Application", 0x1f242c20, 0x4feb, 0x49ac, 0x8f, 0x26, 0x22, 0x59, 0xd6, 0x60, 0xd8, 0xd5)
/////////////////////////////////////////////////////////////////////////////
// CImageSemanticsDlgAutoProxy message handlers