I am working on opening a URL in an existing IE window using an windows API. For example, I opened http://google.com
and then, wanted to open another URL (ex. http://java.sun.com
) in the same window. I already obtained the (HWND) handle to the window.
I have tried ShellExecute(hWnd, "open", "http://java.sun.com
", 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?