Open URL in existing IE Window
Posted
by Chris Eastwood
on January 29th, 2004
To find the existing instance of Internet Explorer, we need to use the FindWindowEx and EnumChildWindows Windows API calls.
FindWindowEx will find a window with a given classname - we then use the EnumChildWindows routine to search that application for the EditControl (read: address text box) in Internet explorer. Once the textbox has been found, a simple SendMessage call can be made with the WM_SETTEXT parameter to set the address.
Once the text has been set in IE's address textbox, we can simply do another SendMessage call, this time with WM_KEYDOWN and passing the 'return' key constant.

Comments
Modify existing code
Posted by Legacy on 05/22/2003 12:00amOriginally posted by: komal
ReplyDetect that page is fully loaded
Posted by Legacy on 12/11/2002 12:00amOriginally posted by: Jake Miles
How can you detect in the VB program that the page is fully loaded in the IE window?
ReplyCA WE VERIFY THAT THE URL IS NOT A SUB-DOMAIN!
Posted by Legacy on 11/19/2002 12:00amOriginally posted by: Usman Zaheer
Replyget the url from internet explorer
Posted by Legacy on 11/19/2001 12:00amOriginally posted by: Cyrano
Instead of sending a url to a internet explorer window, I would like to get the url from a internet explorer window.
-
Replythats it
Posted by c-o-m-m-a-n-d-e-r on 09/27/2004 08:35amHere we go: //buff ist the handel to IE Windows char buffer[256]; HWND child; HWND ie; if(ie = ::FindWindow("IEFrame",buff)) { if(child = ::FindWindowEx(ie,0,"WorkerW",0)) { if(child = ::FindWindowEx(child,0,"ReBarWindow32",0)) { if(child = ::FindWindowEx(child,0,"ComboBoxEx32",0)) { ::SendMessage(child,WM_GETTEXT,255,(long)&buffer[0]); CString test = buffer; AfxMessageBox(test); } } } }ReplyNetscape
Posted by Legacy on 06/06/2001 12:00amOriginally posted by: Navdeep G
How can i fill data in text boxes of a Netscape Window.???
Reply