Enables the host to replace MSHTML menus and toolbars.
HRESULT ShowUI( DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc );
- [in] A DWORD that receives a DOCHOSTUITYPE value that indicates the type of UI.
- [in] A pointer to an IOleInPlaceActiveObject interface for the active object.
- [in] A pointer to an IOleCommandTarget interface for the object.
- [in] A pointer to an IOleInPlaceFrame interface for the object. Menus and toolbars must use this parameter.
- [in] A pointer to an IOleInPlaceUIWindow interface for the object. Toolbars must use this parameter.
Returns one of the following values.
S_OK Host displays its UI. MSHTML will not display its UI. S_FALSE Host did not display its UI. MSHTML will display its UI. DOCHOST_E_UNKNOWN Host did not recognize the UI identifier. MSHTML will either try an alternative identifier for compatibility with a previous version, or display its UI.
If the host uses any of the interfaces handed to it as part of this function, the host should call the interface's AddRef method to save the interface for later use. If the host calls the interface's AddRef method, the host must also call the interface's Release method when the interface is no longer required.
To avoid a memory leak, forward calls to IDocHostUIHandler::ShowUI to the default UI handler.
A host can disable modeless UI on MSHTML by calling IOleCommandTarget::Exec with IDM_DISABLEMODELESS and IDM_ENABLEMODELESS.