File: DlgProxy.cpp

package info (click to toggle)
iceweasel 2.0.0.19-0etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 298,784 kB
  • ctags: 317,912
  • sloc: cpp: 1,796,902; ansic: 987,677; xml: 109,036; makefile: 47,777; asm: 35,201; perl: 26,983; sh: 20,879; cs: 6,232; java: 5,513; python: 3,249; pascal: 459; lex: 306; php: 244; csh: 132; objc: 97; yacc: 79; ada: 49; awk: 14; sql: 4; sed: 4
file content (86 lines) | stat: -rw-r--r-- 2,894 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// DlgProxy.cpp : implementation file
//

#include "stdafx.h"
#include "IEPatcher.h"
#include "DlgProxy.h"
#include "IEPatcherDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CIEPatcherDlgAutoProxy

IMPLEMENT_DYNCREATE(CIEPatcherDlgAutoProxy, CCmdTarget)

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

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

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

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

// {A6031677-3B36-11D2-B44D-00600819607E}
static const IID IID_IIEPatcher =
{ 0xa6031677, 0x3b36, 0x11d2, { 0xb4, 0x4d, 0x0, 0x60, 0x8, 0x19, 0x60, 0x7e } };

BEGIN_INTERFACE_MAP(CIEPatcherDlgAutoProxy, CCmdTarget)
	INTERFACE_PART(CIEPatcherDlgAutoProxy, IID_IIEPatcher, Dispatch)
END_INTERFACE_MAP()

// The IMPLEMENT_OLECREATE2 macro is defined in StdAfx.h of this project
// {A6031675-3B36-11D2-B44D-00600819607E}
IMPLEMENT_OLECREATE2(CIEPatcherDlgAutoProxy, "IEPatcher.Application", 0xa6031675, 0x3b36, 0x11d2, 0xb4, 0x4d, 0x0, 0x60, 0x8, 0x19, 0x60, 0x7e)

/////////////////////////////////////////////////////////////////////////////
// CIEPatcherDlgAutoProxy message handlers