Article ID: 196339 - Last Review: August 5, 2004 - Revision: 3.2 SAMPLE: WebBand.exe Hosts WebBrowser Control in an Explorer BandThis article was previously published under Q196339 SUMMARY
WebBand is a Explorer band sample that demonstrates how to host the
WebBrowser control in an Explorer Band. (For more information about
Explorer bands, please see the REFERENCES section in this article.)
WebBand demonstrates how to deal with a lot of the complicated issues of hosting the WebBrowser control in an Explorer band, such as keystroke and navigation problems. MORE INFORMATIONThe following file is available for download from the Microsoft Download Center: WebBand.exe
(http://download.microsoft.com/download/ie5/webband/1/win98/en-us/webband.exe)
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
WebBand is a band object sample that demonstrates how to host the
WebBrowser control in an Vertical/Explorer band. This sample is very
similar to the Search band that comes with Internet Explorer 4.0 and later.
To use WebBand, follow these steps.
WebBand is able to get around the keystroke issues that are most commonly associated with hosting the WebBrowser control in an Explorer band. These keystroke issues often cause problems with the backspace and delete keys when focus is set to an edit box by clicking on it with the left mouse button. These problems are caused by focus problems. The problem is usually that Internet Explorer does not know that the band currently has the focus. In order to alleviate these problems, WebBand implements IOleControlSite. In the IOleControlSite::OnFocus method, the WebBrowser's IInputObjectSite::OnFocusChangesIS must be called to tell the WebBrowser that WebBand now has the focus. Whenever a key is pressed, three things occur:
Using Internet Explorer 4.0, you are only able to navigate to WebBand.htm and Results.htm. The Back link on the search results page, has a fragment identifier (that is, bookmark) associated with it. This fragment identifier is currently named "#_mysearch." In the BeforeNavigate2 event handler, WebBand checks for this fragment identifier in the URL. If it exists in the URL, the target of the navigation is changed to the band window. NOTE: This sample was created using Visual C++ 6.0. It will compile in Visual C++ 5.0 but you will see some compiler warnings due to new Visual C++ 6.0 compiler directives. REFERENCES
Explorer Bars/Band Objects in the MSDN Online Web Builder Workshop:
http://msdn.microsoft.com/workshop/browser/ext/overview/bands.asp
(http://msdn.microsoft.com/workshop/browser/ext/overview/bands.asp)
BandObjs sample in the Internet Client SDK:
http://msdn.microsoft.com/library/devprods/vs6/vc++/vcsample/vcsmpbandobjs.htm
(http://msdn.microsoft.com/library/devprods/vs6/vc++/vcsample/vcsmpbandobjs.htm)
Reusing the WebBrowser control:
http://msdn.microsoft.com/workshop/browser/webbrowser/webbrowser.asp
(http://msdn.microsoft.com/workshop/browser/webbrowser/webbrowser.asp)
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Scott
Roberts, Microsoft Corporation.
APPLIES TO
| Article Translations
|

Back to the top
