共用方式為


IDocHostUIHandler2 interface

Extends IDocHostUIHandler with a method that facilitates Windows Internet Explorer registry changes.

Members

The IDocHostUIHandler2 interface inherits from IDocHostUIHandler. IDocHostUIHandler2 also has these types of members:

  • Methods

Methods

The IDocHostUIHandler2 interface has these methods.

Method Description
GetOverrideKeyPath

Gets a registry subkey path that modifies Internet Explorer user preferences.

 

Remarks

On initialization, MSHTML calls QueryInterface on the host's client site, and requests an IDocHostUIHandler2 interface. If the interface is available, MSHTML calls IDocHostUIHandler2 methods during the lifetime of the MSHTML component.

By implementing this interface, MSHTML can communicate with the host about its user interface status. The host can use this interface to modify internal user interface elements, such as menus, context menus, and toolbars.

IDocHostUIHandler2::GetOverrideKeyPath provides an alternate mechanism to IDocHostUIHandler::GetOptionKeyPath for a WebBrowser Control host to make changes in the registry settings for the WebBrowser Control. By using IDocHostUIHandler2::GetOverrideKeyPath, your WebBrowser Control instance preserves the registry settings for the current user. Any registry changes located at the registry path that are specified by this method override those located in HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer. Compare this to IDocHostUIHandler::GetOptionKeyPath, which causes a WebBrowser Control instance to default to its original settings before registry changes are applied from the registry path specified by the method.

Note  The version 5.5 WebBrowser Control does not query its host for IDocHostUIHandler2 (Knowledge Base Q272968). If you are hosting Mshtml.dll directly, MSHTML version 5.5 will query for IDocHostUIHandler2. The version 6 WebBrowser Control does query for IDocHostUIHandler2.

 

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtmhst.h

IDL

Mshtmhst.idl

DLL

Shdocvw.dll

See also

IDocHostUIHandler