CHtmlView Class
Provides the functionality of the WebBrowser control within the context of MFC's document/view architecture.
class CHtmlView : public CFormView
Members
Public Methods
Name |
Description |
---|---|
Creates the WebBrowser control. |
|
Overridable used to create a control site instance to host a control on the form. |
|
Executes the specified command using the IOleCommandTarget::Exec method. |
|
Executes a command. |
|
Determines if the Internet Explorer object's address bar is visible. (WebBrowser control ignores; Internet Explorer only.) |
|
Retrieves an application object representing the application that contains the current instance of the Internet Explorer application. |
|
Retrieves a value indicating whether a download or other activity is still in progress. |
|
Retrieves the container of the WebBrowser control. |
|
Retrieves the full name, including the path, of the resource displayed in the web browser. (WebBrowser control ignores; Internet Explorer only.) |
|
Indicates whether the WebBrowser control is operating in full-screen mode or in normal window mode. |
|
Retrieves the height of the Internet Explorer main window. |
|
Retrieves the active HTML document. |
|
Retrieves the screen coordinate of the left edge of the Internet Explorer main window. |
|
Retrieves the name of the resource that WebBrowser is currently displaying |
|
Retrieves the URL of the resource that WebBrowser is currently displaying. |
|
Retrieves a value that determines whether the menu bar is visible. |
|
Retrieves a value that determines whether the control is offline. |
|
Retrieves a pointer to the IDispatch interface. For more information, see Implementing the IDispatch Interface [Automation]. |
|
Retrieves the current value of a property associated with the given object. |
|
Retrieves the ready state of the web browser object. |
|
Indicates whether the WebBrowser control is registered as a top-level browser for target name resolution. |
|
Indicates whether the WebBrowser control is registered as a drop target for navigation. |
|
Indicates whether any dialog boxes can be shown. |
|
The HTML source code of the web page. |
|
Indicates whether the Internet Explorer's status bar is visible. (WebBrowser control ignores; Internet Explorer only.) |
|
Indicates whether the WebBrowser control is in theater mode. |
|
Retrieves a value that determines whether the toolbar is visible. |
|
Retrieves the screen coordinate of the top edge of the Internet Explorer main window. |
|
Retrieves a value indicating whether the current object is the top-level container of the WebBrowser control. |
|
Retrieves the type name of the document object. |
|
Retrieves a value indicating whether the object is visible or hidden. |
|
Retrieves the width of the Internet Explorer main window. |
|
Navigates to the previous item in the history list. |
|
Navigates to the next item in the history list. |
|
Navigates to the current home or start page. |
|
Navigates to the current search page. |
|
Loads a resource in the WebBrowser control. |
|
Navigates to the resource identified by a URL. |
|
Navigates to the resource identified by a URL, or to the file identified by a full path. |
|
Called before a navigation occurs in the given WebBrowser (on either a window or frameset element). |
|
Called to notify an application that the enabled state of a web browser command has changed. |
|
Called to notify an application that a document has reached the READYSTATE_COMPLETE state. |
|
Called from the Internet Explorer or MSHTML implementation of IOleInPlaceActiveObject::OnDocWindowActivate, which notifies the active in-place object when the container's document window is activated or deactivated. |
|
Called to notify an application that a navigation operation is beginning. |
|
Called when a navigation operation finished, was halted, or failed. |
|
Called to enable or disable modeless dialog boxes when the container creates or destroys a modal dialog box. |
|
Called on the host by Internet Explorer or MSHTML to allow the host to replace Internet Explorer or MSHTML's data object. |
|
Called from IOleInPlaceActiveObject::OnFrameWindowActivate to notify the object when the container's top-level frame window is activated or deactivated. |
|
Called when the FullScreen property has changed. |
|
Called by Internet Explorer or MSHTML when it is being used as a drop target to allow the host to supply an alternative IDropTarget. |
|
Called by Internet Explorer or MSHTML to obtain the host's IDispatch interface. |
|
Retrieves the UI capabilities of the Internet Explorer or MSHTML host. |
|
Returns the registry key under which Internet Explorer or MSHTML stores user preferences. |
|
Called when Internet Explorer or MSHTML removes its menus and toolbars. |
|
Called when the MenuBar property has changed. |
|
Called after a navigation to a hyperlink completes (on either a window or frameset element). |
|
Called by the framework if navigation to a hyperlink fails. |
|
Called when a new window is to be created for displaying a resource. |
|
Called to notify an application that the progress of a download operation has been updated. |
|
Called to notify an application that the PutProperty method has changed the value of a property. |
|
Called to notify an application that the Internet Explorer application is ready to quit. (Applies to Internet Explorer only) |
|
Called from the Internet Explorer or MSHTML implementation of IOleInPlaceActiveObject::ResizeBorder, which alerts the object that it needs to resize its border space. |
|
Called from Internet Explorer or MSHTML when it is about to show its context menu. |
|
Called before Internet Explorer or MSHTML displays its menus and toolbars. |
|
Called when the StatusBar property has changed. |
|
Called to notify an application that the text of the status bar associated with the WebBrowser control has changed. |
|
Called when the TheaterMode property has changed. |
|
Called to notify an application if the title of a document in the WebBrowser control becomes available or changes. |
|
Called when the ToolBar property has changed. |
|
Called by Internet Explorer or MSHTML when IOleInPlaceActiveObject::TranslateAccelerator or IOleControlSite::TranslateAccelerator is called to process menu accelerator-key messages from the container's message queue. |
|
Called by Internet Explorer or MSHTML to allow the host an opportunity to modify the URL to be loaded. |
|
Notifies the host that the command state has changed. |
|
Called when the window for the WebBrowser control should be shown/hidden. |
|
Sets the value of a property associated with the given object. |
|
Queries for the status of one or more commands generated by user interface events. |
|
Queries the status of a command being processed by the WebBrowser control. |
|
Reloads the current file. |
|
Reloads the current file and optionally prevents the pragma:nocache header from being sent. |
|
Shows or hides the Internet Explorer object's address bar. (WebBrowser control ignores; Internet Explorer only.) |
|
Sets a value to determine whether the control is operating in full-screen mode or in normal window mode. (WebBrowser control ignores; Internet Explorer only.) |
|
Sets the height of the Internet Explorer main window. |
|
Sets the horizontal position of the Internet Explorer main window. |
|
Sets a value to determine whether the control's menu bar is visible. (WebBrowser control ignores; Internet Explorer only.) |
|
Sets a value to determine whether the control is offline. |
|
Sets a value indicating whether the WebBrowser control is registered as a top-level browser for target name resolution. |
|
Sets a value indicating whether the WebBrowser control is registered as a drop target for navigation. |
|
Sets a value to determine whether the control will display dialog boxes. |
|
Sets a value to determine whether the Internet Explorer's status bar is visible. (WebBrowser control ignores; Internet Explorer only.) |
|
Sets a value indicating whether the WebBrowser control is in theater mode. |
|
Sets a value to determine whether the control's toolbar is visible. (WebBrowser control ignores; Internet Explorer only.) |
|
Sets the vertical position of the Internet Explorer main window. |
|
Sets a value indicating whether the object is visible or hidden. |
|
Sets the width of the Internet Explorer main window. |
|
Stops opening a file. |
Remarks
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.
Note
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.
Inheritance Hierarchy
CHtmlView
Requirements
Header: afxhtml.h