SetUIHandler method
Sets the IDocHostUIHandler interface for MSHTML.
Syntax
HRESULT retVal = object.SetUIHandler(pUIHandler);
Parameters
- pUIHandler [in]
-
Type: IDocHostUIHandler
A pointer to the host's IDocHostUIHandler interface.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
MSHTML releases its previous IDocHostUIHandler interface (if one is present) and calls the pUIHandler AddRef method.
Note When you call ICustomDoc::SetUIHandler, MSHTML also uses your implementation of the IOleCommandTarget interface to handle commands, such as Save As. If you do not handle the call to Exec, MSHTML uses its own handler.
Show: