Click here to Skip to main content
15,892,005 members
Articles / Web Development / HTML

Handling VB ActiveX Events in Visual C++ Client

Rate me:
Please Sign up or sign in to vote.
4.92/5 (17 votes)
8 May 20019 min read 273.7K   2.5K   88  
This article shows how to handle custom events generated in a VB ActiveX component in a Visual C++ client.
#if !defined(AFX_MFCSINK_H__49141D3B_3B6A_423D_8183_5C4396C2AED1__INCLUDED_)
#define AFX_MFCSINK_H__49141D3B_3B6A_423D_8183_5C4396C2AED1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MFCSink.h : header file
//



/////////////////////////////////////////////////////////////////////////////
// MFCSink command target

class MFCSink : public CCmdTarget
{
	DECLARE_DYNCREATE(MFCSink)

	MFCSink();           // protected constructor used by dynamic creation

// Attributes
public:

// Operations
public:
	virtual ~MFCSink();
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(MFCSink)
	public:
	virtual void OnFinalRelease();
	//}}AFX_VIRTUAL

// Implementation
protected:
	

	// Generated message map functions
	//{{AFX_MSG(MFCSink)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(MFCSink)
	afx_msg void evtNotify();
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MFCSINK_H__49141D3B_3B6A_423D_8183_5C4396C2AED1__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
India India
Amit Dey is a freelance programmer from Bangalore,India. Chiefly programming VC++/MFC, ATL/COM and PocketPC and Palm platforms. Apart from programming and CP, he is a self-taught guitar and keyboard player.

He can be contacted at visualcdev@hotmail.com


Comments and Discussions