⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgproxy.cpp

📁 我自己寫的攝像頭MTF公式計算程序,可以計算攝像頭的MTF. VC++6.0.
💻 CPP
字号:
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "MTF.h"
#include "DlgProxy.h"
#include "MTFDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMTFDlgAutoProxy

IMPLEMENT_DYNCREATE(CMTFDlgAutoProxy, CCmdTarget)

CMTFDlgAutoProxy::CMTFDlgAutoProxy()
{
	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(CMTFDlg, AfxGetApp()->m_pMainWnd);
	m_pDialog = (CMTFDlg*) AfxGetApp()->m_pMainWnd;
	m_pDialog->m_pAutoProxy = this;
}

CMTFDlgAutoProxy::~CMTFDlgAutoProxy()
{
	// 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 CMTFDlgAutoProxy::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(CMTFDlgAutoProxy, CCmdTarget)
	//{{AFX_MSG_MAP(CMTFDlgAutoProxy)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

BEGIN_DISPATCH_MAP(CMTFDlgAutoProxy, CCmdTarget)
	//{{AFX_DISPATCH_MAP(CMTFDlgAutoProxy)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()

// Note: we add support for IID_IMTF to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .ODL file.

// {9B86A2D0-4570-40ED-9FB6-6D3C194CC6F9}
static const IID IID_IMTF =
{ 0x9b86a2d0, 0x4570, 0x40ed, { 0x9f, 0xb6, 0x6d, 0x3c, 0x19, 0x4c, 0xc6, 0xf9 } };

BEGIN_INTERFACE_MAP(CMTFDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CMTFDlgAutoProxy, IID_IMTF, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {C4528F62-12BE-4E96-913D-B83C7A0ECA86}
IMPLEMENT_OLECREATE2(CMTFDlgAutoProxy, "MTF.Application", 0xc4528f62, 0x12be, 0x4e96, 0x91, 0x3d, 0xb8, 0x3c, 0x7a, 0xe, 0xca, 0x86)

/////////////////////////////////////////////////////////////////////////////
// CMTFDlgAutoProxy message handlers

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -