Click to See Complete Forum and Search --> : How to change Windows setting from a Win32 program


Winchester
February 7th, 2005, 11:59 AM
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?

NoHero
February 7th, 2005, 12:07 PM
Why not running iexplore directly?


ShellExecute(NULL, NULL, "iexplore.exe", "http://www.codeguru.com", NULL, SW_NORMAL);

kkez
February 7th, 2005, 12:35 PM
Or, you can use "opennew" as instruction to open the default browser in case internet explorer isn't the default browser:

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