WebBrower之Programming and Reusing the Browser

Programming and Reusing the Browser

 

Internet Explorer uses Microsoft ActiveX Controls and Active Document interfaces to connect components.

 

 

IExplore.exe is at the top level; it is a small application that is instantiated when Internet Explorer is loaded. This executable application uses Internet Explorer components to perform the navigation, history maintenance, favorites maintenance, HTML parsing and rendering, and so on, while it supplies the toolbar and frame for the stand-alone browser. IExplorer.exe directly hosts the Shdocvw.dll component.

 

Shdocvw.dll in turn hosts the Mshtml.dll component, as well as any other Active Document component (such as a Microsoft Office application) that can be loaded in place in the browser when the user navigates to a specific document type. Shdocvw.dll supplies the functionality associated with navigation, in-place linking, favorites and history management, and PICS support. This dynamic-link library (DLL) also exposes interfaces to its host to allow it to be hosted separately as an ActiveX control. The Shdocvw.dll component is more frequently referred to as the WebBrowser Control. In-place linking refers to the ability to click a link in the HTML of the loaded document and to load a new HTML document in the same instance of the WebBrowser Control. If only Mshtml.dll is being hosted, a click on the link results in a new instance of the browser.

 

Mshtml.dll is the component that performs the HTML parsing and rendering in Internet Explorer 4.0 and later, and it also exposes the HTML document through the Dynamic HTML Object Model. This component hosts the scripting engines, Microsoft virtual machine, ActiveX Controls, plug-ins, and other objects that might be referenced in the loaded HTML document. Mshtml.dll implements the Active Document server interfaces, which allows it to be hosted using standard Component Object Model (COM) interfaces.

 

The WebBrowser Control provides a rich set of functionality that a host typically requires, such as that for in-place linking. Therefore, it is much more applicable for most applications to host this control instead of MSHTML for browsing or viewing HTML documents. Hosting MSHTML is recommended only for specialized applications, such as parsing HTML. The WalkAll Sample Source Page demonstrates how to host MSHTML.

 

It should also be noted that although hosting MSHTML is slightly more lightweight than hosting the WebBrowser Control, the savings rarely justify the extra work involved in implementing functionality that is already available in the WebBrowser Control. It is very likely that the WebBrowser Control will already be loaded in memory, and navigating to a frameset page will also result in the WebBrowser Control being loaded as part of the standard working set.

 

Excerpted from the MSDN Library article About the Browser. © 2005 Microsoft Corporation.

 

 

Overwiews/Tutorials

 

This section contains overview and tutorial articles for programming and reusing the browser.

 

 

WebBrowser Control

 

This section contains reference information on WebBrowser Control.

 

Documentation: About the Browser

Documentation: NavigateError Event Status Codes

Documentation: WebBrowser Customization

 

Wrapper functions:  TB_WEBBR

 

MSHTML Reference

 

This section contains links to reference articles for MSHTML.

 

Documentation: About MSHTML

Documentation: Creating an HTML Resource

Documentation: Handling HTML Events

Documentation: Introduction to Dynamic HTML

Documentation: Reusing MSHTML

 

Wrapper functions:  TB_HTML

 

DHTML Editing Component

 

The Microsoft Dynamic HTML (DHTML) Editing Component allows Web authors and application developers to add WYSIWYG DHTML editing capabilities to their Web sites and applications. The editing component uses Microsoft's Component Object Model (COM) technology to provide access to editing services such as basic HTML formatting, tables, undo and redo, and absolute positioning.

 

Documentation: DHTML Editing Component Overview

 

Wrapper functions:  TB_DHTMLED

 

MSHTML Editing

 

The editor provided with MSHTML offers a "what you see is what you get" (WYSIWYG) HTML editing environment with a rich set of capabilities. It can be activated from C++, Visual Basic, and script [and other languages].

 

Documentation: MSHTML Editing

 

Wrapper functions:  TB_HTMLED10.ZIP (23 Kb)

 

Advanced Hosting Reference

 

This document describes the interfaces, methods, structures, and enumerated types used for customizing the behavior of MSHTML objects. For a more general overview of MSHTML's hosting and extensibility mechanisms, see Reusing MSHTML.

 

Documentation: Advanced Hosting Reference

 

 

Associated Browser Reference

 

This section describes various application programming interfaces (APIs) that provide access to browser functionality in addition to the MSHTML, WebBrowser control, and hosting references.

 

Documentation: Associated Browser Reference

 

 

Filters

 

Microsoft DirectX Transform enables the use of enhanced and animated images on your Web page or Windows application.

 

Documentation: Filters Overviews and Tutorials

Documentation: Filters Reference

 

 

Hyperlinks

 

This section describes Microsoft ActiveX Hyperlinking and the interfaces involved in adding hyperlink navigation to your document or application.

 

Documentation: Hyperlinks

 

 

MLang

 

This section covers the functionality provided by MLang, which is intended to help developers solve problems presented by the international scope of the Internet. These tools allow a developer to deal with a variety of international and multilingual issues.

 

Documentation: MLang

 

 

Timer API

 

The Timer application programming interface (API) provides essential timer services for Microsoft ActiveX Controls, supports external reference clocks, and enables synchronization between controls and scripts.

 

Documentation: Timer API

 

 

Travel Log

 

This section describes Travel Log technology. The travel log interfaces are designed for use by an application which hosts a WebBrowser Control. Use the travel log interfaces to design applications that improve and enhance the user's travel log experience.

 

Documentation: Travel Log

 

 

Windows Address Book

 

This section contains the reference for the Microsoft Windows Address Book (WAB) application programming interface (API).

 

Note  My library TB_MAPIX includes wrapper functions for the Windows Address Book.

 

Documentation: Windows Address Book

 

 

URL Monikers

 

URL monikers allow an application to bind a resource—which is specified by a URL—to a moniker.

 

Documentation: URL Monikers

Documentation: URL Monikers Reference

 

 

Related Topics

 

Å Accessibility

Å Active Input Method Manager (AIMM)

Å Browser Extensions

Å Print Templates

 

你可能感兴趣的:(programming)