?
Solved

about ShellExecute method

Posted on 2005-05-09
6
Medium Priority
?
589 Views
Last Modified: 2013-11-20
i know that ShellExecute method opens a browser in an existing browser. But can a ShellExecute method open in a new browser window. Can it execute in a  new browser window?

  hRet = ::ShellExecute( NULL , "Open" , HttpPath ,
            NULL , NULL , SW_SHOW);
        if ((int)hRet <= 32) {
            // &#65396;&#65431;&#65392;&#20966;&#29702;&#12364;&#24517;&#35201;&#12394;&#12425;&#12371;&#12371;&#12408;
            bOpenFlg = FALSE;
        }
        if ( bOpenFlg == FALSE ) {
            hRet = ::ShellExecute( NULL , NULL , "iexplore.exe" ,
                HttpPath , NULL , SW_SHOW );
            if ((int)hRet <= 32) {
                // &#65396;&#65431;&#65392;&#20966;&#29702;&#12364;&#24517;&#35201;&#12394;&#12425;&#12371;&#12371;&#12408;
                bOpenFlg = FALSE;
            }
        }

the code above executes an application and open it in a iexplorer browser but when you already have an open iexplorer browser it overlaps it and it doesnt open in a new window. is there any way how can i open a new window? thanx for the help in advance. If ShellExecute cant do it can you suggest other functions.
0
Comment
Question by:haroldxious
6 Comments
 
LVL 4

Assisted Solution

by:Skonen
Skonen earned 82 total points
ID: 13965978
That's handled internally by Internet Explorer, you can see the option in Internet Options->Advanced->Browsing->Reuse windows for launching shortcuts.  IE may access the registry to determine the setting every time shortcut is launched (but very doubtful), in which case you can change the registry setting before and after using ShellExecute.
0
 
LVL 3

Expert Comment

by:NawalKishore1976
ID: 13966011
Use
System ("C:\Program Files\Internet Explorer\iexplore.exe" urlPath);

The same effect you can get from ShellExecute also.

Try this with command (dos)window. everytime it will launch a new instance of IE
0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 82 total points
ID: 13967794
Try with WinExec()
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
NawalKishore1976 earned 86 total points
ID: 13984822
There is one more option CreateProcess to launch the application with full control. Check it
0
 
LVL 1

Author Comment

by:haroldxious
ID: 14073658
i cant understand the shell execute method can you help me in that method?
0
 
LVL 1

Author Comment

by:haroldxious
ID: 14128326
hello follow up with this function using sellexecute i cant open a window on an existing browser. for example: http://www.geocities.com/haroldxious/ visit the site for picture.  my application opens the Unformation server plus browser then i open a google and a yahoo. when i click on my application exe file again i want that if there is an existing Information server plus browser it will load on that existing browser and not open a new one or overlap the yahoo. i want that it will overlap the existing information server plus browser. how will i do that. hope you can help me in my problem. thx
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question