CHtmlView

The CHtmlView class provides the functionality of the WebBrowser control within the context of MFC's document/view architecture. The WebBrowser control is a window in which the user can browse sites on the World Wide Web, as well as folders in the local file system and on a network. The WebBrowser control supports hyperlinking, Uniform Resource Locator (URL) navigation, and maintains a history list.

Using the CHtmlView Class in an MFC Application

In the standard MFC framework application (either SDI or MDI based), the view object is commonly derived from a specialized set of classes. These classes, all derived from CView, provide specialized functionality beyond that provided by CView.

Basing the application's view class on CHtmlView provides the view with the WebBrowser control. This effectively makes the application a web browser. The preferred method of creating a web browser-style application is to use the MFC AppWizard, and specify CHtmlView as the view class. For more information on implementing and using the WebBrowser control within MFC applications, see Web Browser-Style Applications.

The functionality of CHtmlView is designed for applications that are access the Web (and/or HTML documents). The following CHtmlView member functions apply to the Internet Explorer application only. These functions will succeed on the WebBrowser control, but they will have no visible effect.

#include <afxhtml.h>

Class MembersBase ClassHierarchy Chart

Sample   MFC Sample MFCIE

See Also   IWebBrowser2, in the Platform SDK