![](/uploads/1/2/5/5/125564298/822879715.jpg)
A Web browser is a software program that interprets the coding language of the World Wide Web in graphic form, displaying the translation rather than the coding. This allows anyone to “browse the Web” by simple point and click navigation, bypassing the need to know commands used in software languages.
A web browser is a software application for accessing information on the World Wide Web. With distinct features. One example is text-only browsers that can benefit people with slow Internet connections or those with visual impairments.
The World Wide Web is written in Hypertext Markup Language (HTML), which looks nothing like its graphic translation. To take a peek, Web users can right-click on any empty space in a webpage, and a small pop-up menu will appear. They can choose View Page Source in Firefox®, or View Source in Microsoft’s Internet Explorer® to see what the code looks like.
The first successful graphical Web browser, Mosaic, was written by Marc Andreessen and Eric Bina in 1992 and released in 1993. At that time, the only popular graphical online services were offered by Prodigy, America Online (AOL), and Compuserv. These companies were closed networks that provided their own proprietary content, message boards, email programs, and interfaces, and did not provide access to the Internet.
-->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, effectively you make the application a Web browser by providing the view with the WebBrowser control.
To create a Web browser application based on the MFC document/view architecture
- Follow the directions in Creating an MFC Application.
- In the MFC Application Wizard Application Type page, make certain that the Document/view architecture box is selected. (You can choose either Single document or Multiple documents, but not Dialog based.)
- On the Review Generated Classes page, use the Base class drop-down menu to select
CHtmlView
. - Select any other options you want built into the skeleton application.
- Click Finish.
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 use the WebBrowser control as an active document container to host active documents as well. 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.
![An Example Of A Web Browser Program Is An Example Of A Web Browser Program Is](/uploads/1/2/5/5/125564298/547873856.png)
Note
The WebBrowser ActiveX control (and therefore
CHtmlView
) is available only to applications running under Windows versions 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, which are available in other MFC applications.CHtmlView
acts as a wrapper for the Web browser control, which gives your application a view onto a Web or an HTML page. The wizard creates an override to the OnInitialUpdate function in the view class, providing a navigational link to the Microsoft Visual C++ Web site:You can replace this site with one of your own, or you can use the LoadFromResource member function to open an HTML page that resides in the project's resource script as the default content for the view. For example:
See also
MFC Sample MFCIE
MFC Application Wizard
Set compiler and build properties
Property Pages
Set compiler and build properties
MFC Application Wizard
Set compiler and build properties
Property Pages
Set compiler and build properties
![](/uploads/1/2/5/5/125564298/822879715.jpg)