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

📄 dlgproxy.cpp

📁 PW芯片方案Flash ROM烧写程序
💻 CPP
字号:
//---------------------------------------------------------------------------
// Pixelworks Inc. Company Confidential Strictly Private
//
// $Archive: $
// $Revision: 1.1.1.1 $
// $Author: KevinM $
// $Date: 2003/09/29 18:19:04 $
//
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Copyright 1997-2003 (c) Pixelworks Inc.
//
// Pixelworks owns the sole copyright to this software. Under international 
// copyright laws you (1) may not make a copy of this software except for 
// the purposes of maintaining a single archive copy, (2) may not derive
// works herefrom, (3) may not distribute this work to others. These rights 
// are provided for information clarification, other restrictions of rights 
// may apply as well.
//
// This is an unpublished work.
// --------------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>>>>> WARRANTEE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------------
// Pixelworks Inc. MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE USE OF
// THIS SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
// PURPOSE.
// --------------------------------------------------------------------------
//
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "FlashUpgrader.h"
#include "DlgProxy.h"
#include "FlashUpgraderDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CFlashUpgraderDlgAutoProxy

IMPLEMENT_DYNCREATE(CFlashUpgraderDlgAutoProxy, CCmdTarget)

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

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

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

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

// {B17DE3BD-C27D-4130-B48D-898E97016D21}
static const IID IID_IFlashUpgrader =
{ 0xb17de3bd, 0xc27d, 0x4130, { 0xb4, 0x8d, 0x89, 0x8e, 0x97, 0x1, 0x6d, 0x21 } };

BEGIN_INTERFACE_MAP(CFlashUpgraderDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CFlashUpgraderDlgAutoProxy, IID_IFlashUpgrader, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {9907287F-2F79-4FEE-B7AC-D0472253C0A7}
IMPLEMENT_OLECREATE2(CFlashUpgraderDlgAutoProxy, "FlashUpgrader.Application", 0x9907287f, 0x2f79, 0x4fee, 0xb7, 0xac, 0xd0, 0x47, 0x22, 0x53, 0xc0, 0xa7)

/////////////////////////////////////////////////////////////////////////////
// CFlashUpgraderDlgAutoProxy message handlers

⌨️ 快捷键说明

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