IE 3.0 introduced the internet toolbar (or "coolbar") which is suitable for browsing, which is quite different from the Win95 shell's explorer toolbar. This two different toolbar was not a problem until we integrates the browser functionality into the explorer in IE 4.0. First, we tried it with two separate toolbars (from which the user can choose), but we've received many negative feedback against it from users. It became clear for us that we need to merge two toolbar into one. This document describes a proposed toolbar extension mechanism which allows us to have a single toolbar which is suitable for both with shell type folders (directories, my computer, control panel) and web pages.
Since we need to achieve this in a very short development time frame, it's very important to know exactly what are our goals:
UI negotiation will be performed between a shell view (IShellView) and a shell browser (IShellBrowser). We introduce one new interface (IExplorerToolbar) to perform UI negotiation, one new service GUID (SID_SExplorerToolbar) to help finding the service, and use one existing interface (IOleCommandTarget from ActiveX document interfaces) to invoke commands.
DECLARE_INTERFACE_(IExplorerToolbar,
IUnknown)
{
// *** IExplorerToolbar methods ***
HRESULT SetCommandTarget(IUnknown* punkCmdTarget, const GUID* pguidCmdGrp, DWORD dwFlags);// Std buttons are Stop, Home, Refresh, ...
HRESULT AddStdBrowserButtons();
HRESULT AddButtons(const GUID * pguidButtonGroup, UINT nButtons, LPTBBUTTON lpButtons);
HRESULT AddString(const GUID * pguidButtonGroup, HINSTANCE hInst, UINT uiResID, LRESULT * pOffset);
HRESULT GetButton(const GUID * pguidButtonGroup, UINT uiCommand, LPTBBUTTON lpButton);
HRESULT GetState(const GUID * pguidButtonGroup, UINT uiCommand, UINT * pfState);
HRESULT SetState(const GUID * pguidButtonGroup, UINT uiCommand, UINT fState);// uiBMPType (BITMAP_NORMAL, BITMAP_HOT, BITMAP_DISABLED
// Offset of the glyphs in the toolbar are returned in pOffset.
HRESULT AddBitmap(const GUID * pguidButtonGroup, UINT uiBMPType, UINT uiCount, TBADDBITMAP * ptb,
LRESULT * pOffset, COLORREF rgbMask);// The size of Glyphs Coolbar expects
HRESULT GetBitmapSize(UINT * uiID);// Not supported
HRESULT SendToolbarMsg(GUID * pguidButtonGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * plRes);
};