如何设置Content-Type的WebBrowser控件的?控件、如何设置、Type、Content

由网友(胯下狙击手)分享简介:是否可以设置内容类型的文档在WebBrowser控件?Is it possible to set the Content-Type of a document in a webbrowser control?例如我怎么能显示出使用DocumentText呈现为XML的web浏览器控件的XML文档?For exam...

是否可以设置内容类型的文档在WebBrowser控件?

Is it possible to set the Content-Type of a document in a webbrowser control?

例如我怎么能显示出使用DocumentText呈现为XML的web浏览器控件的XML文档?

For example how can I show an XML document rendered as XML in a webbrowser control by using DocumentText?

推荐答案

尝试添加扩展到您的的IMoniker :: GetDisplayName 的实施。这将导致URL标记来看HKEY_CLASSES_ROOT下。?? ?键了解MIME类型。然后,你可以使用网页浏览器的documen 的 IPersistMoniker接口来加载绰号。

Try add an extension to your IMoniker::GetDisplayName implementation. This will cause the URL moniker to look under HKEY_CLASSES_ROOT.??? keys for mime types. Then you can use the webbrowser's documen's IPersistMoniker interface to load the moniker.

阅读全文

相关推荐

最新文章