home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************/
- /* */
- /* TurboCAD for Windows */
- /* Copyright (c) 1993 - 2001 */
- /* International Microcomputer Software, Inc. */
- /* (IMSI) */
- /* All rights reserved. */
- /* */
- /******************************************************************/
-
- // DlgProxy.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "LTSample.h"
- #include "DlgProxy.h"
- #include "VpWnd.h"
- #include "LTSampleDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CLTSampleDlgAutoProxy
-
- IMPLEMENT_DYNCREATE(CLTSampleDlgAutoProxy, CCmdTarget)
-
- CLTSampleDlgAutoProxy::CLTSampleDlgAutoProxy()
- {
- EnableAutomation();
-
- // To keep the application running as long as an OLE 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(CLTSampleDlg, AfxGetApp()->m_pMainWnd);
- m_pDialog = (CLTSampleDlg*) AfxGetApp()->m_pMainWnd;
- m_pDialog->m_pAutoProxy = this;
- }
-
- CLTSampleDlgAutoProxy::~CLTSampleDlgAutoProxy()
- {
- // To terminate the application when all objects created with
- // with OLE automation, the destructor calls AfxOleUnlockApp.
- // Among other things, this will destroy the main dialog
- AfxOleUnlockApp();
- }
-
- void CLTSampleDlgAutoProxy::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(CLTSampleDlgAutoProxy, CCmdTarget)
- //{{AFX_MSG_MAP(CLTSampleDlgAutoProxy)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- BEGIN_DISPATCH_MAP(CLTSampleDlgAutoProxy, CCmdTarget)
- //{{AFX_DISPATCH_MAP(CLTSampleDlgAutoProxy)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_DISPATCH_MAP
- END_DISPATCH_MAP()
-
- // Note: we add support for IID_ILTSample to support typesafe binding
- // from VBA. This IID must match the GUID that is attached to the
- // dispinterface in the .ODL file.
-
- // {31176189-A076-11D1-B79F-000021452DB6}
- static const IID IID_ILTSample =
- { 0x31176189, 0xa076, 0x11d1, { 0xb7, 0x9f, 0x0, 0x0, 0x21, 0x45, 0x2d, 0xb6 } };
-
- BEGIN_INTERFACE_MAP(CLTSampleDlgAutoProxy, CCmdTarget)
- INTERFACE_PART(CLTSampleDlgAutoProxy, IID_ILTSample, Dispatch)
- END_INTERFACE_MAP()
-
- // The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
- // {31176187-A076-11D1-B79F-000021452DB6}
- IMPLEMENT_OLECREATE2(CLTSampleDlgAutoProxy, "LTSample.Application", 0x31176187, 0xa076, 0x11d1, 0xb7, 0x9f, 0x0, 0x0, 0x21, 0x45, 0x2d, 0xb6)
-