Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: ICustomDoc::SetUIHandler Causes Changes in Save As Dialog


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB330441, kbprb

↑ Back to the top

Article Info
Article ID : 330441
Revision : 3
Created on : 11/29/2007
Published on : 11/29/2007
Exists online : False
Views : 362