Share via


Replacement of the MSHTML User Interface (Windows Embedded CE 6.0)

1/6/2010

When MSTHML is integrated into your application you may want to replace the MSHTML UI elements with the host's UI elements.

An MSHTML host can display message boxes, Help UI, and prompts on behalf of MSHTML, by implementing IDocHostUIHandler, IDocHostShowUI, and IDocHostShowUICE. The following list shows the implementation considerations for these interfaces.

  • IDocHostUIHandler
    To replace menus, toolbars, and other UI elements of MSHTML, the host should implement this interface. MSHTML obtains this interface by passing IID_IDocHostUIHandler to the QueryInterface method of the host's client site object. When the IDocHostUIHandler interface is present, MSHTML delegates a number of IOleInPlaceObject and IOleInPlaceActiveObject methods directly to it. This allows a host to hook into methods such as IOleInPlaceActiveObject::TranslateAccelerator and IOleInPlaceActiveObject::ResizeBorder. Returning S_OK on the IDocHostUIHandler::ShowUI method called by MSHTML causes MSHTML to hide its menus and toolbars and not call the IOleInPlaceFrame methods for menu merging and border space negotiation.
  • IDocHostShowUI
    To supply message boxes and Help UI, the host should implement this interface. MSHTML obtains this interface by calling the host's client site QueryInterface, requesting IID_IDocHostShowUI. The site object implements both IOleDocumentSite and IOleClientSite.
  • IDocHostShowUICE
    To show messages that have a resource identifier, display custom user input prompts, and customize file filtering in the open and save dialog boxes, the host should implement this interface.

See Also

Other Resources

Internet Explorer MSHTML/DHTML API OS Design Development