A host can replace the menus, toolbars, and context menus used by MSHTML by implementing the IDocHostUIHandler interface.
IDocHostUIHandler Methods
EnableModeless Called from the MSHTML implementation of IOleInPlaceActiveObject::EnableModeless. Also called when MSHTML displays modal UI. FilterDataObject Called on the host by MSHTML to allow the host to replace MSHTML's data object. GetDropTarget Called by MSHTML when it is being used as a drop target to allow the host to supply an alternative IDropTarget. GetExternal Called by MSHTML to obtain the host's IDispatch interface. GetHostInfo Retrieves the UI capabilities of the MSHTML host. GetOptionKeyPath Returns the registry key under which MSHTML stores user preferences. HideUI Called when MSHTML removes its menus and toolbars. OnDocWindowActivate Called from the MSHTML implementation of IOleInPlaceActiveObject::OnDocWindowActivate. OnFrameWindowActivate Called from the MSHTML implementation of IOleInPlaceActiveObject::OnFrameWindowActivate. ResizeBorder Called from the MSHTML implementation of IOleInPlaceActiveObject::ResizeBorder. ShowContextMenu Called from MSHTML to display a context menu. ShowUI Allows the host to replace the MSHTML menus and toolbars. TranslateAccelerator Called by MSHTML when IOleInPlaceActiveObject::TranslateAccelerator or IOleControlSite::TranslateAccelerator is called. TranslateUrl Called by MSHTML to allow the host an opportunity to modify the URL to be loaded. UpdateUI Notifies the host that the command state has changed.
Interface Information
Implementation Custom Inherits from IUnknown Header and IDL files Mshtmhst.h; Mshtmhst.idl Minimum availability Internet Explorer 4.0 Minimum operating systems Windows 95, Windows NT 4.0
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Remarks
MSHTML obtains an IDocHostUIHandler interface by calling the host's client site QueryInterface, requesting IID_IDocHostUIHandler. This interface has methods that allow MSHTML to communicate with the host about its UI status.