Click here to Skip to main content
15,888,290 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 9-Mar-10 5:01am
v3

IWebBrowser2 would work with IE only. If you want to open the URL in the default web browser rather than showing it inside your window then you can use ShellExecute or ShellExecuteEx functions. http://support.microsoft.com/kb/224816[^]
 
Share this answer
 
My question is: How to show a web page in shell view of exploer?
 
Share this answer
 
Try ShellExceute (I forgot exactly how it's done in C++, but ShellExecute sounds like it should point you in the right direction).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900