Exploration of IE
Green Apple Studio February 08, 2001 13:28
This section explains the architecture of Microsoft Internet Explorer 4.0 and later and provides information used when using its components, including the following: * Architecture overview; * Select the correct components; * Provide additional control; * Control context Menu; * Extended dynamic HTML object model; * control download; * Safety management. Architecture Overview Internet Explorer uses Microsoft ActiveX controls and Active Document interfaces to connect to each component. The figure below provides a high-level overview: IExplore.exe is on the top; it is a small application that is instantiated when Internet Explorer loads. This executable application uses Internet Explorer to complete browsing, historical maintenance, favorites maintenance, HTML syntax analysis, and translation, etc., and it provides toolbars and frameworks for separate browsers. IExplorer.exe references the shdocvw.dll component directly. The SHDOCVW.DLL then references the mshtml.dll component, and when the user browses to a specific type of document, he can reference other Active Document components (such as Microsoft Office applications) that can be loaded to browse. SHDOCVW.DLL provides features with browsing, built-in connectivity, collectors, and historical management, and graphics support. This DLL also provides an interface to its host so that it can be referenced separately like an ActiveX control. SHDOCVW.DLL components are often referenced as a WebBrowser control. Built-in connection refers to the ability to click the HTML link in the loaded document and then load a new HTML document in the same instance of the WebBrowser control. If only MSHTML.dll is referenced, click the link to cause a new browser instance. Mshtml.dll is an HTML syntax analysis and translation in Internet Explorer 4.0 or later, and provides an HTML document with a dynamic HTML object model. This component references script engines, Microsoft Virtual Machines, ActiveX controls, plugins, and other objects that it can be referenced. Mshtml.dll implements an Active Document server interface, so that it can be referenced through a standard COM interface. When using the frame, ShDocvw.dll is referenced by MSHTML.DLL, which forms the normal. In this case, each frame is an instance of the SHDOCVW.DLL that references MSHTML.dll. Since this is an OLE-based architecture, the peripheral properties commonly used by ActiveX controls are equally applicable to Internet Explorer components. In this way, the host of the webbrowser control can set the peripheral properties to filter all the frames and controls of the loaded document reference. Choose the correct component control WebBrowser control to provide typical features required by the host, such as a built-in connection. This way, for most browsing or viewing the HTML document, reference to WebBrower is more appropriate than reference MSHTML. Only special, for example, applications for syntax analysis for HTML We recommend reference to MSHTML. It should also be noted that although the reference MSHTML is slightly smarter than reference WebBrowser controls, saving costs rarely compensate for additional work required to implement feature in WebBrowser. WebBrowser is likely to be loaded into memory and browsing the page containing the framework will also cause WebBrowser as part of the standard work set to be loaded. The host that provides additional control WebBrowser and MSHTML components can control specific features.
For webbrowser controls, this includes browsing and accepts events when loading documents. Both components can provide additional controls by implementing the IDOCHOSTUIHANDAL and IDOCHOSTSHOWUI interface. These interfaces are often used to replace the context-related menu provided by default by default. Their uses also include setting up a three-dimensional border, replacing the location of the registry key for saving options and extension dynamic HTML object models. The component obtains these interfaces from the host by adjusting QueryInterface from the host application implementation of IoleClientSite. Control the context-related menu There is a common requirement when referring to the WebBrowser control, is the context-related menu that can be replaced or added in the browser window. Those who use the WebBrowser Confusion to view rich content without want users to know that they are in viewing HTML applications. At the same time, this capability is useful for applications that do not want users to see the HTML source code of the content. There are two technologies to do this. The first involves using the IDOCHOSTUIHANDLER interface and allows applications to ban or replace the context-related menu. The second technique uses a registry and allows the extension of the existing context-related menu. ● Alternative Context Related menus can replace the context-related menu of the WebBrowser control through the IdochostuiHandler :: ShowContextMenu method. Returns E_NOTIMPL or S_FALSE from this method to tell WebBrowser that it should display its own standard context-related menu. However, returning S_OK causing WebBrowser not displaying its menu and assumes that the host program takes appropriate action. The host program can prohibit all context-related menus or use its own context-related menu. Parameters provided to the host program that implement this method allow the host program to identify the WEBBROWSER's coordinates of the default menus and menus that will be displayed. This provides all context-related menus to the host program. For example, the host program can select only a context-related menu that replaces the graphic and retains the standard context-related menu. ● Adding Standard Context Related menus You can add menu items to WebBrowser existing context-related menus by adding items in the registry and connecting them to the URL that performs scripts. To add a menu item to the standard context-related menu, create or open: HKEY_CURRENT_USER SOFTWARE Microsoft Internet Explorer Menuext In this location, you want to create a new key with the text you want to display in the menu. The default value of the key is the URL that will be executed. The key name can include & characters, indicating that the characters followed by & later will have underscores. The URL will be loaded into a hidden HTML dialog that will be executed, and then close the dialog. The hidden HTML dialog box's external.Menuarguments property contains the Window object that performs the window of the context-related menu item. The following registry content adds a menu item titled "My Menu Item" to the context-related menu of WebBrowser, which executes embedded scripts in File C: /Myscript.htm.
HKEY_CURRENT_USER Software Microsoft Internet Explorer MenuExt My Menu Item = "file: // c: /myscript.htm" c: /myscript.htm reads as follows: