Click here to Skip to main content
15,895,777 members
Articles / Desktop Programming / WTL

RSS Reader Plug-in for Internet Explorer

Rate me:
Please Sign up or sign in to vote.
5.00/5 (12 votes)
16 Jul 2007CPOL4 min read 317.7K   1.3K   32  
This is a toolbar for the Internet Explorer which shows information from RSS taken from the Internet.
/*
	Project		: RSS Reader plugin for Internet Explorer
	File Name	: RRPComInterfaceImplementor.h
	Date		: 
	Purpose		: It implements all the COM intefaces requrired by IE,to make
				  this Component eligible as IE deskband (IE toolbar in this case)
	Note		: Generated by IE Deskband Wizard by RadBytes.com
	Send comments 
	or Bugs to	: prafulla_t@users.sourceforge.net
*/
#ifndef __RRPCOMINTERFACEIMPLEMENTOR_H_
#define __RRPCOMINTERFACEIMPLEMENTOR_H_

#include "resource.h"					// main symbols
#include "RRPReflectionWindow.h"		//Reflection Widnow class
#include "RRPToolbar.h"					//Main toolbar class
#include "RRPDebugInfoLogger.h"	//Logging Support

//
// These are needed for IDeskBand
//

#include <shlguid.h>
#include <shlobj.h>


/////////////////////////////////////////////////////////////////////////////
// CRRPComInterfaceImplementor
class ATL_NO_VTABLE CRRPComInterfaceImplementor : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CRRPComInterfaceImplementor, &CLSID_RRPComInterfaceImplementor>,
	public IDeskBand,
	public IObjectWithSite,
	public IInputObject,
	public IPersistStream,
	public IDispatchImpl<IRRPComInterfaceImplementor, &IID_IRRPComInterfaceImplementor, &LIBID_RSSREADERPLUGINLib>
{
public:
	CRRPComInterfaceImplementor();
	~CRRPComInterfaceImplementor();

DECLARE_REGISTRY_RESOURCEID(IDR_RRPCOMINTERFACEIMPLEMENTOR)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_CATEGORY_MAP(CRRPComInterfaceImplementor)
//	IMPLEMENTED_CATEGORY(CATID_InfoBand)
//	IMPLEMENTED_CATEGORY(CATID_CommBand)
//	IMPLEMENTED_CATEGORY(CATID_DeskBand)
END_CATEGORY_MAP()

BEGIN_COM_MAP(CRRPComInterfaceImplementor)
	COM_INTERFACE_ENTRY(IRRPComInterfaceImplementor)
		//This line was added by me
	COM_INTERFACE_ENTRY_IID(IID_IInputObject,IInputObject)
	COM_INTERFACE_ENTRY(IOleWindow)
	COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
	COM_INTERFACE_ENTRY(IObjectWithSite)
	COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
	COM_INTERFACE_ENTRY(IPersist)
	COM_INTERFACE_ENTRY(IPersistStream)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IDeskBand
public:
	STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi);

// IObjectWithSite
public:
	STDMETHOD(SetSite)(IUnknown* pUnkSite);
	STDMETHOD(GetSite)(REFIID riid, void **ppvSite);

// IOleWindow
public:
	STDMETHOD(GetWindow)(HWND* phwnd);
	STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);

// IDockingWindow
public:
	STDMETHOD(CloseDW)(unsigned long dwReserved);
	STDMETHOD(ResizeBorderDW)(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved);
	STDMETHOD(ShowDW)(BOOL fShow);

// IPersist
public:
	STDMETHOD(GetClassID)(CLSID *pClassID);

// IPersistStream
public:
	STDMETHOD(IsDirty)(void);
	STDMETHOD(Load)(IStream *pStm);
	STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty);
	STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize);

// IInputObject
public:
   STDMETHOD(HasFocusIO)(void);
   STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg);
   STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg);



// IRRPComInterfaceImplementor
public:
	void FocusChange(BOOL bHaveFocus);
protected:
	BOOL RegisterAndCreateWindow();
protected:
	//Code by RadByte plug-in for MS VS 6
	DWORD m_dwBandID;
	DWORD m_dwViewMode;
	BOOL m_bShow;
	BOOL m_bEnterHelpMode;
	HWND m_hWndParent;
	HWND m_hWnd;
	IInputObjectSite* m_pSite;

private:
	//Code By me..
	RRPReflectionWindow reflectionWindow;
	RRPToolbar rrpToolbar;
	RRPDebugInfoLogger *debug;
	IWebBrowser2 *webBrowser;
};

#endif //__RRPCOMINTERFACEIMPLEMENTOR_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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
Quote : "Life is all about solving problems and enjoying their solutions !! "

Comments and Discussions