Click here to Skip to main content
15,896,606 members
Articles / Desktop Programming / MFC

Thunking MouseProc in IE add-in

Rate me:
Please Sign up or sign in to vote.
4.38/5 (7 votes)
3 Nov 20044 min read 70.5K   1K   41  
An article on thunking MouseProc in IE add-in using BHO.
// BrowserHelperObject.h : Declaration of the CBrowserHelperObject

#ifndef __BROWSERHELPEROBJECT_H_
#define __BROWSERHELPEROBJECT_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CBrowserHelperObject
class ATL_NO_VTABLE CBrowserHelperObject : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CBrowserHelperObject, &CLSID_BrowserHelperObject>,
	public IObjectWithSiteImpl<CBrowserHelperObject>,
	public IDispatchImpl<IBrowserHelperObject, &IID_IBrowserHelperObject, &LIBID_TESTMOUSEHOOKLib>
{
public:
	CBrowserHelperObject() : m_hWnd(NULL), m_dwTID(0)
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_BROWSERHELPEROBJECT)
DECLARE_NOT_AGGREGATABLE(CBrowserHelperObject)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CBrowserHelperObject)
	COM_INTERFACE_ENTRY(IBrowserHelperObject)
	COM_INTERFACE_ENTRY(IObjectWithSite)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IObjectWithSite
public:
	STDMETHOD(SetSite)(IUnknown *pUnkSite);

// IBrowserHelperObject
public:

private:
	DWORD m_dwTID;
	HWND m_hWnd;
};

#endif //__BROWSERHELPEROBJECT_H_

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Other
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions