Click here to Skip to main content
15,886,026 members
Articles / Desktop Programming / ATL

Internet Explorer Toolbar (Deskband) Tutorial

Rate me:
Please Sign up or sign in to vote.
4.94/5 (126 votes)
21 Aug 2001CPOL27 min read 2.9M   22.8K   451  
A tutorial on Using RBDeskband and CWindowImpl ATL Object Wizards to create an Internet Explorer(IE) Toolbar.
//MFToolbar.h : Declaration of the CMFToolbar

//***************************************************************************//
//                                                                           //
//  This file was created using the CWindowImpl ATL Object Wizard            //
//  By Erik Thompson � 2000                                                  //
//	Version 1.1                                                              //
//  Email questions and comments to ErikT@RadBytes.com                       //
//                                                                           //
//***************************************************************************//

#ifndef __MFTOOLBAR_H_
#define __MFTOOLBAR_H_

#include <commctrl.h>
#include "EditQuote.h"

/////////////////////////////////////////////////////////////////////////////
// CMFToolbar
class CMFToolbar : public CWindowImpl<CMFToolbar>
{
public:

	
	DECLARE_WND_SUPERCLASS(TEXT("MOTLEYFOOLTOOLBAR"), TOOLBARCLASSNAME)

	BEGIN_MSG_MAP(CMFToolbar)
		CHAIN_MSG_MAP_MEMBER(m_EditWnd)
		MESSAGE_HANDLER(WM_CREATE, OnCreate)
		MESSAGE_HANDLER(WM_SIZE, OnSize)
		MESSAGE_HANDLER(WM_COMMAND, OnCommand)
		MESSAGE_HANDLER(WM_GETQUOTE, OnGetQuote)
	END_MSG_MAP()

// Handler prototypes:
//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnGetQuote(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	CMFToolbar();
	virtual ~CMFToolbar();
	inline CEditQuote& GetEditBox() {return m_EditWnd;};
	void SetBrowser(IWebBrowser2* pBrowser);
	
private:
	CEditQuote m_EditWnd;
	HIMAGELIST m_hImageList;
	IWebBrowser2* m_pBrowser;
	void GetQuote();
};

#endif //__MFTOOLBAR_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
Web Developer
United States United States
Erik lives in Redmond, Washington. He works as a Senior Software Engineer specializing in C++, COM, ATL and the middle-tier and now .NET. When he isn't coding for work, he can be found trying to extend Internet Explorer with yet another Desk band or simplifying his development process with ATL Object Wizards.

He spends his free time snowboarding, mountain biking, and online gaming.

Comments and Discussions