In VC, How to fire up the default browser with a URL. 
Author Message
 In VC, How to fire up the default browser with a URL.

Hi,
  Here's a question.
  I want to fire up the default browser with a URL as the parameter.
  But I don't know how to do it in Visual C++,
  Any one can help me?

Thanks a lot




Fri, 09 May 2003 03:00:00 GMT  
 In VC, How to fire up the default browser with a URL.

You can use
            ShellExecute(...) function to do this.

            See the examples in msdn.

            Next time do not cross-post.

Cheers
Check Abdoul
------------------


Quote:
> Hi,
>   Here's a question.
>   I want to fire up the default browser with a URL as the parameter.
>   But I don't know how to do it in Visual C++,
>   Any one can help me?

> Thanks a lot





Fri, 09 May 2003 03:00:00 GMT  
 In VC, How to fire up the default browser with a URL.
Look into the ShellExecute() API function.

Jeff


Quote:
> Hi,
>   Here's a question.
>   I want to fire up the default browser with a URL as the parameter.
>   But I don't know how to do it in Visual C++,
>   Any one can help me?

> Thanks a lot





Fri, 09 May 2003 03:00:00 GMT  
 In VC, How to fire up the default browser with a URL.

CString mcstrUrlString="www.microsoft.com";
ShellExecute( this->m_hWnd,
                      NULL,
                     "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE",
                       mcstrUrlString,
                        NULL,
                        SW_SHOWMINIMIZED);

One more thing, it is very rude to cross post in every news group. It seems
as if you did not even read the name of the news groups when you posted.


Quote:
> Hi,
>   Here's a question.
>   I want to fire up the default browser with a URL as the parameter.
>   But I don't know how to do it in Visual C++,
>   Any one can help me?

> Thanks a lot





Fri, 09 May 2003 03:00:00 GMT  
 In VC, How to fire up the default browser with a URL.

Quote:
>  I want to fire up the default browser with a URL as the parameter.

        ShellExecute( hWnd, NULL,
                        "http://www.microsoft.com",
                        NULL, NULL, SW_SHOWNORMAL );

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 10 May 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to fire up the default browser with a URL as parameter

2. How to fire up the default browser with a URL as parameter

3. How to fire up the default browser with a URL as parameter

4. How to fire up the default browser with a URL as parameter

5. In VC, How to fire up the default browser with a URL.

6. In VC, How to fire up the default browser with a URL.

7. How to open a URL with the default browser

8. In VC, How to fire up the default browser with a URL.

9. Opening the default browser with a URL

10. How to launch the default browser by URL with HIGH_PRIORITY_CLASS

11. how to launch default web-browser with any URL

12. How to open a URL with the default browser

 

 
Powered by phpBB® Forum Software