PRB: ICustomDoc::SetUIHandler Causes Changes in Save As Dialog (330441)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 6 (SP1)
  • Microsoft Internet Explorer (Programming) version 6.0

This article was previously published under Q330441

SYMPTOMS

After you call the ICustomDoc::SetUIHandler method, the Save As menu in Internet Explorer appears without the option to save as an MHT file and without the option to save as a Web package.

CAUSE

The Microsoft HTML parsing and rendering engine (MSHTML) default command handler, not the SHDOCVW component command handler, handles the Save As command. (The Shdocvw component implements core Internet Explorer and shell browser frames.) The Save As dialog in MSHTML that is implemented in Mshtml.dll does not contain support for the full Save As dialog that SHDOCVW provides. This is a design limitation in Internet Explorer.

RESOLUTION

Implement the IDocHostUIHandler interface through the Web browser control client site. Do not call SetUIHandler if the full Save As dialog is important. This means that you must host the Web browser control must be hosted, if it is not already hosted.

MORE INFORMATION

Before you call SetUIHandler, MSHTML routes the Save As command to SHDOCVW before MSHTML defaults to its own. Because SHDOCVW handles it, you see that the full Save As dialog and the command are not routed to the MSHTML default handler. When you call SetUIHandler, MSHTML uses your implementation of the IOleCommandTarget interface in your object that implements IDocHostUIHandler to handle the Save As command. MSHTML calls Exec, and then if you do not handle it, MSHTML uses its own handler.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbprb KB330441 kbAudDeveloper