Open an URL in an existing IE window

MaheswariGuntupalli used Ask the Experts™
I am working on opening a URL in an existing IE window using an windows API. For example, I opened and then, wanted to open another URL (ex. in the same window. I already obtained the (HWND) handle to the window.
I have tried ShellExecute(hWnd, "open", "", NULL, SW_SHOWDEFAULT) for this; but it is always opening the URL in a new window. I want this to be opened in the same window with handle hWnd. Can anyone help me in this regard?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2011

Not a propgrammer, but I believe this is going to be controlled by the IE setting in the Advanced Options, "Resue windows for launching shortcuts"
Send Ctr+T event to existing IE by using it's handle and then can use Navigate() to open URL.
Don't use ShellExecute() better use CreateProcess() by which u can get handle to that IE.
CreateProcessEx() can be used.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial