|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
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 Application Wizard, and specify CHtmlView as the view class. For more information on implementing and using the WebBrowser control within MFC applications, see Creating a Web Browser-Style Application.
The WebBrowser ActiveX control (and therefore CHtmlView) is available only to programs running under Windows NT versions 4.0 or later, in which Internet Explorer 4.0 or later has been installed.
CHtmlView is designed for applications that 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.