Contents Index Topic Contents | ||
Previous Topic: IDocHostUIHandler::ShowContextMenu Next Topic: IDocHostUIHandler::TranslateAccelerator |
IDocHostUIHandler::ShowUI
HRESULT ShowUI( DWORD dwID, IOleInPlaceActiveObject FAR *pActiveObject, IOleCommandTarget FAR *pCommandTarget, IOleInPlaceFrame FAR *pFrame, IOleInPlaceUIWindow FAR *pDoc );Allows the host to replace the IE4/MSHTML menus and toolbars.
- Return Values:
S_OK Host displayed its own UI. IE4/MSHTML will not display its UI. S_FALSE Host did not display its own UI. IE4/MSHTML will display its UI. DOCHOST_E_UNKNOWN Host did not recognize the UI identifier. IE4/MSHTML will either try an alternative identifier for compatibility with a previous version or display its own UI.
- dwID
- Reserved for future use.
- pActiveObject
- IOleInPlaceActiveObject interface of the currently active object.
- pCommandTarget
- IOleCommandTarget interface of the object.
- pFrame
- IOleInPlaceFrame interface of the object. This is needed for menus and toolbars.
- pDoc
- IOleInPlaceUIWindow interface for the object. This is needed for toolbars.
This method is called just before IE4/MSHTML displays its menus and toolbars. If the host returns S_FALSE from this method, IE4/MSHTML does not display its UI and assumes that the host is handling the UI.
If the host makes use of any of the interfaces handed to it as part of this function, it should call the interface's AddRef method if it is to be saved for later use. If the host calls the interface's AddRef method, it must also call the interface's Release method when the interface is no longer required.
A host can disable modeless UI on IE4/MSHTML by calling IOleCommandTarget::Exec with IDM_DISABLEMODELESS and IDM_ENABLEMODELESS.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.