Home COM GDI+ WebBrowser Data Access 

Overviews/Tutorials

 

 

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

 

 

Overviews/Tutorials

About MSHTML

 

All interfaces for accessing the Dynamic HTML (DHTML) Object Model are based on IDispatch and are the basis of access to the object model that is also used by scripts.

 

About the Browser

 

This section explains the architecture of Microsoft Internet Explorer 4.0 and later, and provides information you'll find helpful when reusing these components.

 

Creating an HTML Resource

 

Rather than distribute separate HTML files for your application's use, you can add the raw HTML to your application as a resource. You can then retrieve the HTML from your application when it is needed. ShowHTMLDialog is one example of how HTML can be used from a resource by using the res: protocol.

 

Handling Events in Visual Basic Applications

How do you trap events in objects contained by WebBrowser objects in a way that enables you to handle the events with native Microsoft Visual Basic code? This article explains how to create a Visual Basic-based application that consists of a class module and a form that contains a WebBrowser object. Members of the class trap events from an HTML document object contained by the WebBrowser object, then "forward" the events to a procedure in the form. Visual Basic code in the form can then execute in response to the forwarded events.
 

Handling HTML Element Events

 

The HTMLElementEvents2 interface is an event sink interface that enables an application to receive events for HTML elements. Your custom application can receive these events, which are fired in response to user actions on HTML elements, when hosting the WebBrowser Control or automating Internet Explorer.

 

How to Create a Binary Element Behavior using ATL

 

This document describes how to create a binary element behavior. A binary element behavior is an element behavior that is implemented in C++ and compiled. Because it is compiled, a binary element behavior has increased performance over a script-based element behavior. If the performance of a script-based element behavior is inadequate, you can re-implement it as a binary element behavior. A binary element behavior can also be used in situations where a script-based element behavior cannot; binary element behaviors, unlike script-based element behaviors, have access to the entire operating system so they can do anything an ordinary application can—such as access the file system.

 

IHtmlDlgSafeHelper Character Sets

 

Return value from IHtmlDlgSafeHelper::getCharset method. The values are specified by the Microsoft Win32   application programming interface (API) function GetTextCharset.

 

Implementing a Custom Download Manager

 

The ability to implement a custom download manager was introduced in Internet Explorer 5.5. This feature enables you to extend the functionality of Internet Explorer and WebBrowser applications by implementing a Component Object Model (COM) object to handle the file download process.

 

Interfaces and Scripting Objects

 

This section lists the C/C++ object model interfaces, and identifies which scripting objects most closely match these interfaces.

 

Internet Explorer Client Registry Layout

 

Internet Explorer supports user selection of Internet service applications, such as mail and news clients. This article describes how to make your Internet service applications available to Internet Explorer. The registry settings referred to in this article are supported in Internet Explorer 4.0 and later, unless otherwise indicated.

 

Internet Explorer for Windows CE

 

Internet Explorer for Microsoft Windows CE is the most compatible, feature-rich browser control for the Windows CE operating system. Developers, OEMs, independent software vendors (ISVs), and independent hardware vendors (IHVs) can use the technologies provided by Internet Explorer for Windows CE to build a custom browser for a specific device or market.

 

Introduction to Markup Services

 

Markup Services is a set of interfaces and objects that allow you to manipulate the contents of an HTML document. This article introduces these interfaces and objects.

 

Introduction to the Hit Logging API

 

The Channel Definition Format (CDF) files allow content providers to determine which hits get logged for the items included in the CDF file. These logs are posted to the server during a scheduled update and cleared. This API allows developers to verify if hit logging is enabled and write customized entries in the log.

 

IUrlHistory

 

The IUrlHistory interfaces provide functionality to manage Internet Explorer history information.

 

IUrlHistory Flags

 

The following flags are used by the IUrlHistoryStg::QueryUrl and IEnumSTATURL::SetFilter functions.

 

Licensing and Distribution

 

Beginning with Internet Explorer 4.0, application developers who want to redistribute Internet Explorer technologies—such as the WebBrowser Control, Wininet.dll, Urlmon.dll, or Comctl32.dll (or Common Controls DLL)—must obtain a royalty-free redistribution license for Internet Explorer and download a copy of the Internet Explorer Administration Kit (IEAK) through the IEAK Web Site.

 

Loading HTML content from a Stream

The IPersistStreamInit interface, and its associated methods, can be used to load HTML content from a stream using the WebBrowser control and Microsoft Visual C++.
 

Mastering Internet Explorer: Using the WebBrowser control

 

This article provides practical information and code samples on how to implement the Web Browser Control in your application.

 

MSHTML Reference

 

This section contains references to interfaces and corresponding scripting objects, MSHTML C++ events, MSHTML functions, and CGID_MSHTML command identifiers.

 

NavigateError Event Status Codes

 

The following tables list the possible errors returned by the StatusCode parameter of the DWebBrowserEvents2::NavigateError event handler. For more information on HTTP status codes, see HTTP Status Codes.

 

Reusing MSHTML

 

MSHTML was introduced in Internet Explorer 4.0. It is the main HTML component of the Internet Explorer browser and can be used in other applications. It hosts Microsoft ActiveX Controls and supports the OLE Control '96 (OC96) specification for windowless controls.

 

Reusing the WebBrowser Control

The WebBrowser control adds browsing, document viewing, and data downloading capabilities to your applications. Applications using this control will allow the user to browse sites on the Internet's World Wide Web, as well as folders in the local file system and on a network. The WebBrowser control supports Web browsing through both point-and-click hyperlinking and URL navigation. The control maintains a history list that allows the user to browse forward and backward through previously browsed sites, folders, and documents.

 

Security Considerations: Programming and Reusing the Browser

This document provides information about security considerations related to programming and reusing the browser. This document doesn't provide all you need to know about security issues—instead, use it as a starting point and reference for this technology area.
 

Take Total Control of Internet Explorer with Advanced Hosting Interfaces

With the Advanced Hosting Interfaces supported by Internet Explorer, programmers can actually drive the user interface and internals of the WebBrowser control.

 

Using MFC to Host a WebBrowser Control

This tutorial explains how to use the Microsoft Foundation Classes (MFC) to add a WebBrowser control to your C++ application.
 

WebBrowser Customization

 

This tutorial shows you several ways to customize the "out of the box" behavior and appearance of the WebBrowser Control. You'll see how to use the advanced hosting interfaces IDocHostUIHandler, IDocHostUIHandler2, IDocHostShowUI, and ICustomDoc. This article will also look at other customization techniques such as download control through handling DISPID_AMBIENT_DLCONTROL in the host's IDispatch implementation, and using IHostDialogHelper.

 

Windows Search Assistant

 

The Windows Search Assistant, located inside the Search bar, is a new feature of Internet Explorer 5 that provides a common query interface for users when starting a search. It helps refine the search process by providing a task-based approach. Also, it is not necessary for users to remember the various common and specialty search engines that are available.

 

 

How To's and Other Articles

 

 

A memory leak occurs when an MSHTML instance is hosted by a WebBrowser control or by Internet Explorer

Determining the Preferred Hypertext Link Color

BUG: Application Error When You Use DoEvents in WebBrowser ProgressChange Event

BUG: Cannot edit Word document in OLE or WebBrowser control

BUG: DocumentComplete Does Not Fire When WebBrowser Is Not Visible

BUG: OnBeforeUnload() Does Not Fire When Hosting WebBrowser Control

BUG: POST Navigate Call Fails If the WebBrowser Control Displays an XML Document

BUG: Using NewWindow or NewWindow2 to Always Navigate in the Same Window Fails in Some Instances

BUG: Window.Closed Property Fails in WebBrowser Control

CustWBC.exe sample shows how to control the WebBrowser control that is embedded in an ATL HTML control

FILE: Invoke Find, View Source, Options Dialog Boxes for WebBrowser

FIX: IDocHostUIHandler Not Queried for CLSID_WebBrowser_V1

How To Automate Internet Explorer to POST Form Data

How To Call a Script Function from a VC WebBrowser Application

How To Cause Navigation to Occur in Same WebBrowser Window

How to change print settings for Internet Explorer and the WebBrowser control programmatically in Internet Explorer

How To Change the Font Size in a WebBrowser Control That Is Hosted Inside a Visual Basic Application

How To Change WebBrowser Properties Stored in Property Bag

How To Clear Cache When Your Application Hosts a WebBrowser Control

How To Communicate with a UserDocument from a WebBrowser Control

How To Determine When a Page Is Done Loading in WebBrowser Control

How To Display HTML Using the WebBrowser Control in a Visual C++/MFC Application

How To get the WebBrowser object model of an HTML frame

How To Handle Data from a Post Form When Hosting WebBrowser Control

How To handle script errors as a WebBrowser control host

How To Insert Event Handler Into Web Page from WebBrowser App

How To invoke the View Source dialog box, the Find dialog box, and the Internet Options dialog box for the WebBrowser control

How To Obtain Width and Height Supplied to Window.open Inside the Visual C++ WebBrowser Host

How To print custom headers and footers for a WebBrowser control in Internet Explorer

How To Print the WebBrowser Control

How To Print the Contents of a WebBrowser Control from Visual Basic

How To Programmatically Change Printer Settings for Internet Explorer and WebBrowser Control by Using Visual Basic .NET

How To Programmatically Change Printer Settings for Internet Explorer and WebBrowser Control by Using Visual C# .NET
How To sink HTML document events for WebBrowser host

How To Suppress Run-Time Script Errors as a WebBrowser Control Host in a Visual Basic Application

How To Use Forward and Back Buttons for WebBrowser Control

How To Use the PostData Parameter in WebBrowser Control

How To Use the WebBrowser Control NewWindow2 Event

How to use the WebBrowser control NewWindow2 event in Visual Basic .NET

How To use the WebBrowser control and the NewWindow2 event in Visual C++ .NET

How To Use the WebBrowser Control to Open an Office Document

How To Use the WebBrowser Control to Open an Office Document in Visual Basic .NET

How To Use the WebBrowser Control to Open Office Documents with Visual C# .NET

How To Use WebBrowser HEADERS Param in Navigate Method

INFO: Advantages of Hosting WebBrowser Control Instead of MSHTML

INFO: Properties Not Applicable to the WebBrowser Control

INFO: WebBrowser Control Visible Property Fires Onload Event

Managing Favorites Using Windows DNA

Obtaining the HWND for the WebBrowser control

PRB: WebBrowser Control Application and Internet Explorer Sounds

PRB: WebBrowser Control Clients Share Global Settings

PRB: WebBrowser Problems When Refreshing in TitleChange Handler

WBCustomizer.dll Implements IDocHostUIHandler for VB

WebBrowser Keystroke Problems

Mozilla ActiveX Project
 

 

Page last updated on Saturday, 07 January 2006 18:24:08 +0100