EnumerateWindows problem

EnumerateWindows problem

offline
  • zlivuk 
  • Novi MyCity građanin
  • Pridružio: 07 Avg 2010
  • Poruke: 7

pozdrav!naleteo sam na jedan clanak na delphi.about.com/od/windowsshellapi/l/aa060303b.htm o tome kako dobiti text iz ie edit polja za adrese..i naravno hteo sam da ga pokrenem medjutim stalno mi javlja gresku 'Variable required',pa ako bi neko mogao da mi kaze u cemu je stvar..

...
function GetUrlFromIE (Handle: THandle; List: TStringList): boolean; stdcall; ... procedure TForm1.btnRefreshClick(Sender: TObject); begin  lbIEURL.Clear;  EnumWindows(@GetUrlFromIE, LParam(lbIEURL.Items)); <---GRESKA end; 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));           List.Add(Buffer)         end;       end;     end;   end;   //continue enumeration   Result :=True; end; (*GetUrlFromIE*)



Registruj se da bi učestvovao u diskusiji. Registrovanim korisnicima se NE prikazuju reklame unutar poruka.
Ko je trenutno na forumu
 

Ukupno su 865 korisnika na forumu :: 64 registrovanih, 6 sakrivenih i 795 gosta   ::   [ Administrator ] [ Supermoderator ] [ Moderator ] :: Detaljnije

Najviše korisnika na forumu ikad bilo je 3466 - dana 01 Jun 2021 17:07

Korisnici koji su trenutno na forumu:
Korisnici trenutno na forumu: alkatraz080, bagor10, bbogdan, Bobrock1, Botovac, bozo13, braca57, branko7, ccoogg123, dekan.m, doktor097, dragan_mig31, Drug pukovnik, FOX, Georgius, goran.vvv, Ilija Cvorovic, ivica976, JOntra, krkalon, Leonov, Lieutenant, Ligavesh, ljuba, Marko Marković, Mendonca, mercedesamg, miodrag, mocnijogurt, nenad81, Nobunaga, pandur, pedja.st, Pikac-47, procesor, Profica, proka89, Qwertyuio, Ray1973, raykan, Ripanjac, RobinHood12, Rogan33, S2M, Sale1423, samsung, saputnik plavetnila, Simon simonović, Skakac7, slonic_tonic, Srky Boy, stagezin, Steeeefan, Stoilkovic, torlak 1, Trpe Grozni, Van, vasa.93, VladaNS1978, Webb, Wisdomseeker, wizzardone, zastavnik, |_MeD_|