// LEADRasterAnnSink.cpp : implementation file // #include "stdafx.h" #include "oledb.h" #include "LEADRasterAnnSink.h" #include "OLEDBDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CLEADRasterAnnSink IMPLEMENT_DYNCREATE(CLEADRasterAnnSink, CCmdTarget) CLEADRasterAnnSink::CLEADRasterAnnSink() { EnableAutomation(); m_pDlg = NULL; } CLEADRasterAnnSink::~CLEADRasterAnnSink() { } void CLEADRasterAnnSink::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(CLEADRasterAnnSink, CCmdTarget) //{{AFX_MSG_MAP(CLEADRasterAnnSink) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() BEGIN_DISPATCH_MAP(CLEADRasterAnnSink, CCmdTarget) //{{AFX_DISPATCH_MAP(CLEADRasterAnnSink) // NOTE - the ClassWizard will add and remove mapping macros here. DISP_FUNCTION_ID(CLEADRasterAnnSink,"AnnDrawn", 8,OnAnnDrawn, VT_EMPTY,VTS_I4) //}}AFX_DISPATCH_MAP END_DISPATCH_MAP() // Note: we add support for IID_ILEADRasterAnnSink to support typesafe binding // from VBA. This IID must match the GUID that is attached to the // dispinterface in the .ODL file. // {E8CB28E0-EB26-11D4-9EC5-005004892044} static const IID IID_ILEADRasterAnnSink = { 0xe8cb28e0, 0xeb26, 0x11d4, { 0x9e, 0xc5, 0x0, 0x50, 0x4, 0x89, 0x20, 0x44 } }; BEGIN_INTERFACE_MAP(CLEADRasterAnnSink, CCmdTarget) INTERFACE_PART(CLEADRasterAnnSink, DIID__LEADRasterAnnotationEvents, Dispatch) END_INTERFACE_MAP() ///////////////////////////////////////////////////////////////////////////// // CLEADRasterAnnSink message handlers void CLEADRasterAnnSink::OnAnnDrawn(long hAnnObject) { m_pDlg->HandleAnnDrawn(hAnnObject); }