Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

RSS Reader Plug-in for Internet Explorer

, 16 Jul 2007
This is a toolbar for the Internet Explorer which shows information from RSS taken from the Internet.
rssreader_exe.zip
rssreader_src.zip
RssReader_src
RRPRssFetcher
RRPRssFetcher
res
RRPRssFetcher.ico
toolbar.bmp
RRPRssFetcher.vcproj.TEKAWADE.Prafulla V Tekawade.user
RSSReaderplugin
Debug
res
RssReaderPlugin.dll.manifest
RRPComInterfaceImplementor.rgs
RssReaderPlugin.aps
RssReaderPlugin.def
RssReaderPlugin.dsp
RssReaderPlugin.dsw
RssReaderPlugin.opt
RssReaderPlugin.plg
RssReaderPlugin.tlb
RssReaderPlugin.vcproj.TEKAWADE.Prafulla V Tekawade.user
RssReaderPluginps.def
RssReaderPluginps.mk
Setup.iss
/*
	Project		: RSS Reader plugin for Internet Explorer
	File name	: RRPNewsButton.h
	Date		: 
	Pupose		: It encapsulated News Button which has the responsibility of showing
				  News in cool owner-drawn drop down menu.
	Note		: It handle some Window Messaged chainded to it by RRPToolbar class
				  This messages are of course related with Button
	Send comments 
	or Bugs to	: prafulla_t@users.sourceforge.net
*/

#pragma once

#include <atlctrls.h>
#include "RRPRssParser.h"
#include "RRPRssItemIterator.h"
#include "RRPMenuTooltip.h"
#include "RRPRssFetcher.h"


typedef struct MenuItem {
		int commandID;
		char *name;
}MenuItem;

class RRPNewsButton
{
public:
	//Constructior/Destructor
	RRPNewsButton(void);
	~RRPNewsButton(void);


	void setToolbar(RRPToolbar *rrpToolbar);
	void setRssFetcher(RRPRssFetcher *fecher);
	void refreshNews();
	BOOL createButton(char* nameOfButton,int commandID = 101 ,CString message = "Yo",BYTE buttonStyle = BTNS_BUTTON | BTNS_AUTOSIZE);
	void changeButtonCaption(char *str,DWORD dwMask = TBIF_TEXT);
	LRESULT OnClick(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnButtonDropDown(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnDrawItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnMeasureItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnMenuSelect(WPARAM additionalParam, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnMenuClick(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	static char* getDate();

	void setBrowser(IWebBrowser2 *p) {
		this->webBrowser = p;
	};

	void setMenuHandle(HWND handle) {
		menuTooltip->setMenuHandle(handle);
	};

	void setMenuTooltip(RRPMenuTooltip *menuTooltip) {
		this->menuTooltip = menuTooltip; 
	};
	
	
	
	void OnNextHotSpotClicked();
	void OnPrevHotSpotClicked();
	
	RECT getButtonRect();
	UINT getCommandID();
	BOOL isButtonClicked();
	void setButtonClicked(BOOL value);
	HWND getMenuHandle();
	void removeRssFile(bool justRemoveRssFile = false);
private:

	UINT commandID;
	CString newsHeader;
	RECT buttonRect;
	CString nameOfButton;
	POINT menuPosition;
	CString dummyNewsItem;
	
	RRPRssParser *rssParser;//("sample-rss-092.xml");
	RRPMenuTooltip *menuTooltip;
	RRPDebugInfoLogger *debug;
	RRPRssFetcher *rssFetcher;
	RRPToolbar *rrpToolbar;
	IWebBrowser2 *webBrowser;
	
	char *rssFileName;
	static int buttonsCount;
	volatile BOOL buttonClicked;
	int startIndex,endIndex;
};

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)

About the Author

PrafullaT

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 17 Jul 2007
Article Copyright 2007 by PrafullaT
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid