问题描述
如果要在树形扩展中的文件夹视图中打开网页,请单击树形视图中的文件夹名称或文件名,因此我编写了如下代码:
CShellView类:公共IShellView,公共IOleCommandTarget
{
....
}
CShellView :: OnCreate
{
... m_pWebBrowser2.CoCreateInstance(CLSID_InternetExplorer,NULL)
....
}
如果默认的Web浏览器是IE,则代码正确.如果不是IE中的默认Web浏览器,那是错误的.
因此,我使用CLSID_Webbrowser创建对象,但无法打开窗口并导致资源管理器错误.
我尝试创建一个包含webbrrowser控件的对话框,但它仍然是错误的.
除了OP的答案:我的问题是:如何在资源管理器的shell视图中显示网页?
I want to open a webpage in folder view in my shell extension if click a folder name or file name in tree view,so I written code like this:
class CShellView : public IShellView, public IOleCommandTarget
{
....
}
CShellView::OnCreate
{
...m_pWebBrowser2.CoCreateInstance(CLSID_InternetExplorer, NULL)
....
}
if the default web brower is IE,the code is right. if the default web browser in not IE, it is wrong.
So , I use CLSID_Webbrowser to create object, but it cann''t open a window and cause explorer error.
I try to create a dialog with webbrrowser control in it, but it still wrong.
Addition from OP''s answer: My question is: How to show a web page in shell view of explorer?
推荐答案
这篇关于如何在shell扩展中打开网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!