Use ShellExecute to open a webpage window to open the webpage we specified

Source: Internet
Author: User

Reprinted: http://blog.csdn.net/nokianasty/article/details/5996221

 

Use ShellExecute to open a webpage window to open the webpage we specified

 

Execute ShellExecute (null, _ T ("open"), "http://www.csdn.net", null, null, sw_show );
If there is no ie window before, open
However, if one already exists, it is displayed in the original window.
How can I generate a new window display? No matter whether the window has been opened before

 

ShellExecute is a common API that can runProgramTo open the webpage.

ShellExecute (null, "open", "http://www.csdn.net", null, null, sw_showmaximized );

In this way, you can open a Web page, but not in the new ie. You can open the web page in a new ie in the following way.

ShellExecute (null, "open", "istme", "http://www.csdn.net", null, sw_showmaximized); // vc6.0 version
Use the following version in vs2008:

ShellExecute (null, l "open", l "istme", l "http://www.csdn.net", null, sw_showmaximized );

 

It works better with syslink controls! Add the following to the syslink control's click response function:

ShellExecute (null, l "open", l "iexplore", l "http://www.csdn.net", null, sw_showmaximized );

Everything is OK!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.