IE7 and IE6 are the two cases.
In IE6 this gets the URL in the Address bar, where Stradd is the desired:
HWND HIE = NULL; HWND hworker = NULL; HWND Hbar = NULL; HWND Hcombobox = NULL; TCHAR Szaddr[max_path] = {0};hie =:: FindWindow (_t ("IEFrame"), NULL), if (HIE) {Hworker =:: FindWindowEx (HIE, 0, _t ("Worke RW "), NULL);} if (hworker) {Hbar =:: FindWindowEx (hworker, 0, _t ("ReBarWindow32"), NULL);} if (hbar) {HWND Hcombobox =:: FindWindowEx (Hbar, 0, _t ("ComboBoxEx32"), NULL);:: SendMessage (Hcombobox, Wm_gettext, Max_ PATH, (LPARAM) szaddr);}
In IE7 this gets the URL in the Address bar, where Stradd is the desired:
HWND HIE = NULL; HWND hworker = NULL; HWND Hbar = NULL; HWND Hcombobox = NULL; TCHAR Szaddr[max_path] = {0};hie =:: FindWindow (_t ("IEFrame"), NULL), if (HIE) {Hworker =:: FindWindowEx (HIE, 0, _t ("Worke RW "), NULL);} if (hworker) {Hbar =:: FindWindowEx (hworker, 0, _t ("ReBarWindow32"), NULL);} if (hbar) {HWND haddress =:: FindWindowEx (Hbar, 0, _t ("Address Band Root"), NULL); HWND Hcombobox =:: FindWindowEx (haddress, 0, _t ("ComboBoxEx32"), NULL);:: SendMessage (Hcombobox, Wm_gettext, 255, ( LPARAM) stradd);}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Gets the URL in the current IE address bar