Home | Overview | How Do I | Sample | Tutorial
A Web browser-style application can access information from the Internet (such as HTML or Active documents) or an intranet, as well as folders in the local file system and on a network. By deriving the application's view class from CHtmlView, you effectively make the application a Web browser by providing the view with the WebBrowser control.
The WebBrowser control supports Web browsing through hyperlinks and Uniform Resource Locator (URL) navigation. The control maintains a history list that allows the user to browse forward and backward through previously-browsed sites, folders, and documents. The control directly handles the navigation, hyperlinks, history lists, favorites, and security. Applications can also use the WebBrowser control as an Active document container to host Active Documents. Thus, richly formatted documents such as Microsoft Excel spreadsheets or Word documents can be opened and edited in-place from within the WebBrowser control. The WebBrowser control is also an ActiveX control container that can host any ActiveX control.
The WebBrowser ActiveX control (and therefore CHtmlView) is available only to programs running under Windows 95 and Windows NT versions 3.51 and later, in which Internet Explorer 4.0 (or later) has been installed.
Because CHtmlView simply implements the Microsoft Web browser control, its support for printing is not like other CView-derived classes. Rather, the WebBrowser control implements the printer user interface and printing. As a result, CHtmlView does not support print preview, and the framework does not provide for other printing support functions, for example, CView::OnPreparePrinting, CView::OnBeginPrinting, and CView::OnEndPrinting, that are available in other MFC applications.
To create a Web browser-style application, use the MFC AppWizard. In step 6, select CHtmlView as the view's base class. This is discussed in detail in Creating a Web Browser-Style Application.