Disable the new window cration in ShellExecute?
-
Hi all I have try to executing a URL using ShellExecute. Following snippet is working fine but whenever run this, a new browser window is created...
ShellExecute(NULL, NULL, "http://forums.microsoft.com/MSDN/AddPost.aspx?ForumID=96&SiteID=1", NULL,NULL, SW_HIDE);
How to execute a particular URL without creation of new browser window in ShellExecute? Thanks in advance surezsu -
Hi all I have try to executing a URL using ShellExecute. Following snippet is working fine but whenever run this, a new browser window is created...
ShellExecute(NULL, NULL, "http://forums.microsoft.com/MSDN/AddPost.aspx?ForumID=96&SiteID=1", NULL,NULL, SW_HIDE);
How to execute a particular URL without creation of new browser window in ShellExecute? Thanks in advance surezsuCan you explain what do you mean by executing a URL because that would clarify your needs and help us to understand your problem better. Currently at least I don't get the point of executing a URL and hiding the window. Why to execute if you don't want to see it?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Can you explain what do you mean by executing a URL because that would clarify your needs and help us to understand your problem better. Currently at least I don't get the point of executing a URL and hiding the window. Why to execute if you don't want to see it?
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
well, if he already has a browser window open and he executes a "ShellExecute" in his case it will open a NEW browser window instead of just re-using the current browser window. but I'm probably wrong in my translation of the original question.
Maximilien Lincourt Your Head A Splode - Strong Bad
-
well, if he already has a browser window open and he executes a "ShellExecute" in his case it will open a NEW browser window instead of just re-using the current browser window. but I'm probably wrong in my translation of the original question.
Maximilien Lincourt Your Head A Splode - Strong Bad
OH! Now I see. So probably he should rephrase his Question. :-D That said, I now know the reason for not being able to understand his query. If IE is currently running don't open it but use the existing window to reflect the content of the URL requested Or else ...( is still in question) Hmm!!!
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
OH! Now I see. So probably he should rephrase his Question. :-D That said, I now know the reason for not being able to understand his query. If IE is currently running don't open it but use the existing window to reflect the content of the URL requested Or else ...( is still in question) Hmm!!!
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
_AnShUmAn_ wrote:
OH! Now I see. So probably he should rephrase his Question.
Why? It made perfect sense to me.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi all I have try to executing a URL using ShellExecute. Following snippet is working fine but whenever run this, a new browser window is created...
ShellExecute(NULL, NULL, "http://forums.microsoft.com/MSDN/AddPost.aspx?ForumID=96&SiteID=1", NULL,NULL, SW_HIDE);
How to execute a particular URL without creation of new browser window in ShellExecute? Thanks in advance surezsusurezu wrote:
How to execute a particular URL without creation of new browser window in ShellExecute?
You can't.
ShellExecute()
is not going to search for running instances of the program associated with the third argument (i.e., the URL in your case)."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi all I have try to executing a URL using ShellExecute. Following snippet is working fine but whenever run this, a new browser window is created...
ShellExecute(NULL, NULL, "http://forums.microsoft.com/MSDN/AddPost.aspx?ForumID=96&SiteID=1", NULL,NULL, SW_HIDE);
How to execute a particular URL without creation of new browser window in ShellExecute? Thanks in advance surezsuThere is no way you can achieve this using
ShellExecute
. Probably, you can consider using IWebBrowser2 Interface[^]. -
Hi all I have try to executing a URL using ShellExecute. Following snippet is working fine but whenever run this, a new browser window is created...
ShellExecute(NULL, NULL, "http://forums.microsoft.com/MSDN/AddPost.aspx?ForumID=96&SiteID=1", NULL,NULL, SW_HIDE);
How to execute a particular URL without creation of new browser window in ShellExecute? Thanks in advance surezsuIf you really want to stick onto the shellexecute command, may be configuring the browser to force to open in same window may be useful (I won't prefer :) ) You can change the settings of internet explorer in "Internet Options" to use same window. for instance in IE7 You can change HKCU\Software\Microsoft\Internet Explorer\TabbedBrowsing -> ShortcutBehavior to 0, 1, 2. 0 is new window 1 is new tab 2 is current tab or window or disable tabbed browing and resuse same window as HKCU\Software\Microsoft\Internet Explorer\Main\AllowWindowReuse Or Automate Running Instance[^] I prefer to host in my own application using CHtmlView(MFC)