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

Internet Explorer Toolbar (Deskband) Tutorial

, 21 Aug 2001 CPOL
A tutorial on Using RBDeskband and CWindowImpl ATL Object Wizards to create an Internet Explorer(IE) Toolbar.
//EditQuote.cpp : Implementation of CEditQuote

//                                                                           //
//  This file was created using the CWindowImpl ATL Object Wizard            //
//  By Erik Thompson � 2000                                                  //
//	Version 1.1                                                              //
//  Email questions and comments to                       //
//                                                                           //

#include "stdafx.h"
#include "EditQuote.h"
#include "MotleyFool.h"
#include "StockBar.h"

// CEditQuote

: m_pBand(NULL)


STDMETHODIMP CEditQuote::TranslateAcceleratorIO(LPMSG lpMsg)
	int nVirtKey = (int)(lpMsg->wParam);
	if (VK_RETURN == nVirtKey)
		// remove system beep on enter key by setting key code to 0
		lpMsg->wParam = 0;
		::PostMessage(GetParent(), WM_GETQUOTE, 0, 0);
		return S_OK;
	else if (WM_KEYDOWN == lpMsg->message && nVirtKey == VK_TAB)
		if (m_pBand) m_pBand->FocusChange(FALSE);
		return S_FALSE;

	return S_OK;

void CEditQuote::SetBand(CStockBar* pBand)
	m_pBand = pBand;

LRESULT CEditQuote::OnSetFocus(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
	//Notify host that our band has the focus so TranslateAcceleratorIO 
	//messages are directed towards our band.
	if (m_pBand) m_pBand->FocusChange(TRUE);
	return 0;

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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Erik Thompson
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.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150302.1 | Last Updated 22 Aug 2001
Article Copyright 2001 by Erik Thompson
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid