WebBand

所属分类:Windows编程
开发工具:Visual C++
文件大小:63KB
下载次数:12
上传日期:2007-08-09 22:23:05
上 传 者jauming
说明:  internet explorer tool bar

文件列表:
WebBand (0, 2007-08-09)
WebBand\ClsFact.cpp (2715, 1999-04-23)
WebBand\ClsFact.h (1369, 1999-04-23)
WebBand\Globals.h (856, 1999-02-17)
WebBand\Guid.h (1064, 1999-02-21)
WebBand\Release (0, 2004-06-12)
WebBand\res (0, 2004-06-12)
WebBand\res\resource.h (501, 1999-02-22)
WebBand\res\WebBand.aps (19416, 2004-06-10)
WebBand\res\WebBand.ico (1078, 1999-02-22)
WebBand\res\WebBand.rc (1778, 1999-02-22)
WebBand\res\WebBandHot.ico (1078, 1999-02-22)
WebBand\Results.htm (445, 1999-02-21)
WebBand\StdAfx.cpp (294, 1998-08-24)
WebBand\StdAfx.h (802, 1998-08-24)
WebBand\WBExplorerBar.cpp (46262, 1999-05-25)
WebBand\WBExplorerBar.h (6325, 1999-04-23)
WebBand\WebBand.cpp (10858, 1999-05-25)
WebBand\WebBand.def (243, 1999-02-19)
WebBand\WebBand.dsp (5317, 1999-02-21)
WebBand\WebBand.dsw (539, 1998-08-24)
WebBand\WebBand.h (789, 1999-04-23)
WebBand\WebBand.htm (824, 1999-04-13)
WebBand\WebBand.ncb (50176, 2004-06-10)
WebBand\WebBand.opt (53760, 2004-06-10)

TITLE: SAMPLE: WebBand Hosts the WebBrowser Control in an Explorer Band --------------------------------------------------------------------- The information in this article applies to: - Microsoft Internet Explorer (Programming), versions 4.0, 4.01, 4.01sp1, 5.0dp1 --------------------------------------------------------------------- SUMMARY ======= WebBand is a Explorer band sample that demstrates how to host the WebBrowser control in an Explorer Band. (For more information about Explorer bands, please see the References section of 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 INFORMATION ================ The following file(s) are available for download from the Microsoft Software Library: ~ WebBand.exe Release Date: Aug-29-19*** For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services WebBand is a Explorer band sample that demstrates how to host the WebBrowser control in an Explorer Band. This sample is very similar to the Search band that comes with Internet Explorer 4.0 and above. To use WebBand, follow these steps. 1) Copy the WebBand.htm and Results.htm files to the root directory of your Internet server. (e.g., C:\InetPub\wwwroot). If you wish to place these files in a different directory, you must change the definition of SERVER_NAME in the WBExplorerBar.cpp file. 3) Compile the sample code using Visual C++ 5.0 or 6.0. (See the notes below for information about compiling with Visual C++ 5.0) 3) After compiling and registering WebBand.dll, start Internet Explorer 4.0 or above and choose "WebBrowser Explorer Bar" from the "View" menu. If you are using Internet Explorer 4.0x, this will be located under the "Explorer" submenu of the "View" menu. WebBand will load WebBand.htm which contains a form with an edit box and submit button and a couple of links to other web pages. When you type in the edit box and press the Submit button, the Results.htm file will be loaded in the current window. If you click on one of the links on the WebBand.htm web page, the URL will be loaded in the main Internet Explorer window. WebBand acts differently depending on if you are using Internet Explorer 4.0x or 5.0. (You may have noticed that the Search band is different in Internet Explorer 5.0.) The difference is that if you are using Internet Explorer 5.0, WebBand will create a menu in the title bar that contains a list of search pages that have been most recently visited. WebBand tries to imitate this feature in the Internet Explorer 5.0 Search band. That Search band maintains a most-recently used list of five search pages. WebBand will maintain up to six - the five stored in the registry by Internet Explorer 5.0 and one for the default search page. 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 Explorer 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. 1) WebBand's IInputObject::HasFocusIO method is called to see if WebBand currently has the focus. 2) The IInputObject::UIActivateIO method is called to tell WebBand that is is being activated. 3) The IInputObject::TranslateAccelerator method is called. It is here that WebBand passes the keystroke to the hosted WebBrowser control. This causes accelerator keys such as backspace and delete to be processed. Another feature of WebBand is that navigation will occur in the correct window. This is accomplished in a number of ways. When a page is loaded, WebBand sinks events for all anchors on the page through the "all" collection. When an anchor is clicked, the target of the navigation is changed from the Explorer band window to the main Internet Explorer window. 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 (i.e., 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 Explorer 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 ========== "Band Objects" in the Internet Clietn SDK: http://msdn.microsoft.com/developer/sdk/inetsdk/help/itt/Shell/Bands.htm bandobj sample in the Internet Client SDK: http://msdn.microsoft.com/developer/sdk/inetsdk/help/ (c) Microsoft Corporation 19***, All Rights Reserved. Contributions by Scott Roberts, Microsoft Corporation.

近期下载者

相关文件


收藏者