Export (0) Print
Expand All

ShowUI method

Enables the host to replace MSHTML menus and toolbars.

Syntax


HRESULT retVal = object.ShowUI(dwID, pActiveObject, pCommandTarget, pFrame, pDoc);

Parameters

dwID [in]

Type: DWORD

A DWORD that receives a DOCHOSTUITYPE value that indicates the type of UI.

pActiveObject [in]

Type: IOleInPlaceActiveObject

A pointer to an IOleInPlaceActiveObject interface for the active object.

pCommandTarget [in]

Type: IOleCommandTarget

A pointer to an IOleCommandTarget interface for the object.

pFrame [in]

Type: IOleInPlaceFrame

A pointer to an IOleInPlaceFrame interface for the object. Menus and toolbars must use this parameter.

pDoc [in]

Type: IOleInPlaceUIWindow

A pointer to an IOleInPlaceUIWindow interface for the object. Toolbars must use this parameter.

Remarks

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.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft