CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    1

    How to change Windows setting from a Win32 program

    Hi, All.

    I hope someone knows how to change Windows setting that allows to open each folder in its own window, not the same one from a Win32 program.

    I have found function SystemParametersInfo(). It allows to change a lot of settings but not the one necessary for me

    I need this to open a link in a separate window with
    ShellExecute(NULL,"open","http://link.html",NULL,NULL,SW_SHOWNORMAL);
    Unfortunately, now I have "iexplore.exe" started in existing window, not in a new one.

    I have read in MSDN that above setting influences on described behaviour of ShellExecute().

    I think I need to change the setting and restore it after stating a link. I am not sure I will get the necessary result but I want to try.

    Could someone help me?

  2. #2
    Join Date
    Mar 2004
    Location
    (Upper-) Austria
    Posts
    2,899

    Re: How to change Windows setting from a Win32 program

    Why not running iexplore directly?

    Code:
    ShellExecute(NULL, NULL, "iexplore.exe", "http://www.codeguru.com", NULL, SW_NORMAL);
    I am not offering technical guidiance via email or IM
    Come on share your photo with us! CG members photo album!
    Use the Code Tags!

  3. #3
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: How to change Windows setting from a Win32 program

    Or, you can use "opennew" as instruction to open the default browser in case internet explorer isn't the default browser:

    Code:
     ShellExecute(NULL,"opennew","http://link.html",NULL,NULL,SW_SHOWNORMAL);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured