ShellExecuting URLs

This is a discussion on ShellExecuting URLs within the Windows Programming forums, part of the Platform Specific Boards category; Hello, I've written a program that is supposed to show information from a number of different URLs simultaneously. I do ...

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,266

    ShellExecuting URLs

    Hello,

    I've written a program that is supposed to show information from a number of different URLs simultaneously. I do this by calling:-
    Code:
    ShellExecute(hwnd, NULL, szURL, NULL, NULL, SW_SHOW);
    This call is inside a loop which replaces szURL with a different address each time. Sure enough, IE pops up, but only the last address used in the call is shown.

    It seems that each call is being sent out to the single window IE has created, whereas I want each call to open a new window. Seeing as you can't have parameters when opening documents the only way I can see this working is to hard-code IE usage (Refer directly to iexplore.exe), although I would prefer it to work for any browser. Any ideas?

  2. #2
    Cat
    Guest
    Hmm, I don't think there's a standard way for doing that. You could have the browser open a local .html file that uses Javascript to open all the windows, I guess.

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    According to MSDN, if ShellExecute is used to open explorer (also iexplore), it will always look for a currently open one first.

    Looks like you're stuck using a local file with JavaScript.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136

    Re: ShellExecuting URLs

    Should be

    ShellExecute(hwnd, "open", szURL, NULL, NULL, SW_SHOW);

  5. #5
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,266
    True, but "open" is the default verb for most things (Particularly web pages, unless you sadistcally edited it just so my program wouldn't work... ), so I just put NULL to save space.

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Originally posted by SMurf
    True, but "open" is the default verb for most things (Particularly web pages, unless you sadistcally edited it just so my program wouldn't work... ), so I just put NULL to save space.
    Did it work with open?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. List of URLS
    By DarkDot in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 05-07-2007, 09:00 PM
  2. Program to URLS from internet
    By DarkDot in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2007, 08:45 PM
  3. Outlook 2003 blocking URLs
    By ober in forum Tech Board
    Replies: 7
    Last Post: 12-21-2005, 11:59 AM
  4. Stripping URL's in Perl
    By rotis23 in forum Linux Programming
    Replies: 3
    Last Post: 07-23-2003, 09:24 AM
  5. URl's?????
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-04-2002, 11:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21