![]() |
|
#1
|
|||
|
|||
|
I Want to get all instant of IE, and follow this forum I have got this codes to do:
Function GetUrlFromIE (Handle: THandle; List: TStringList): boolean; stdcall; var hWndIE, hWndIEChild : HWND; Buffer : array[0..255] of Char; begin //get the window caption SendMessage(Handle, WM_GETTEXT, 255, integer(@Buffer[0])); //look for the Internet Explorer window with "Buffer" caption hWndIE := FindWindow('IEFrame', Buffer); if hWndIE > 0 then begin //try to get a handle to IE's toolbar container hWndIEChild := FindWindowEx(hWndIE, 0, 'WorkerW', nil); if hWndIEChild > 0 then begin //get a handle to address bar hWndIEChild := FindWindowEx(hWndIEChild, 0, 'ReBarWindow32', nil); if hWndIEChild > 0 then begin //finally, locate combo box and add its text to the list hWndIEChild := FindWindowEx(hWndIEChild, 0, 'ComboBoxEx32', nil); if hWndIEChild > 0 then begin SendMessage(hWndIEChild, WM_GETTEXT, 255, integer(@Buffer)); List.AddObject(Buffer,TObject(hWndIE)); end; end; end; end; //continue enumeration Result :=True; end; (*GetUrlFromIE*) But those codes only in WidowsXP, Who Can help me to do in WinDowsME or WinDows98 ? |
|
#2
|
|||
|
|||
|
I believe the classname of the IE window under Win98 should be WorkerA due to the fact that the W in the classname WorkerW ought to refer to the Unicode nature of the window that owns it, and we all know that Win98 isn't actually a Unicode system
Hope that helps... gLes |
|
#3
|
|||
|
|||
|
do you mean useing WorkerA , not use WorkerW ? in windowsME or 98 ? it's all thing ?
|
|
#4
|
|||
|
|||
|
Win9x, incl. Me are not Unicode OSs, A should stand for ANSI, WinNT,2k,XP,2k3 are Unicode OSs, W should stand for Widestring or whatever, I mean I'm sure it's not Widestring, but that makes sense if you are programming in Delphi, but it's definitely related to Unicode
Was I clear enough? So under Win98 and Me use WorkerA, under WinNT, 2k, and XP use WorkerW that's the point ![]() gLes |
![]() |
| Thread Tools | |
| Display Modes | |
|
|