Ver Mensaje Individual
  #2  
Antiguo 25-06-2005
jorodgar jorodgar is offline
Miembro
 
Registrado: abr 2005
Posts: 76
Reputación: 20
jorodgar Va por buen camino
De momento solo he obtenido el titulo haciendo lo siguiente.
Me he guiado con el programa WinSPy 1.0 para obtener las classes.
Como obtengo la URL???

Código Delphi [-]
 unit Unit1;
 
 interface
 
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
   Dialogs, StdCtrls;
 
 type
   TForm1 = class(TForm)
   Button1: TButton;
   lbIEURL: TListBox;
   procedure Button1Click(Sender: TObject);
   private
     { Private declarations }
   public
     { Public declarations }
   end;
 
 var
   Form1: TForm1;
 
 function GetUrlFromFirefox (Handle: THandle; List: TStringList): boolean; stdcall;
 
 implementation
 
 {$R *.dfm}
 
 function GetUrlFromFirefox (Handle: THandle; List: TStringList): boolean; stdcall;
 var
   hWndFX, hWndFXChild : HWND;
   Buffer : array[0..255] of Char;
 begin
   SendMessage(Handle, WM_GETTEXT, 255, integer(@Buffer[0]));
 
   hWndFX := FindWindow('MozillaWindowClass', Buffer);
   if hWndFX > 0 then
   begin
     SendMessage(hWndFXChild, WM_GETTEXT, 255, integer(@Buffer));
     if buffer<>'' then
       List.AddObject(Buffer,TObject(hWndFX));
   end;
   Result :=True;
 end;
 
 procedure TForm1.Button1Click(Sender: TObject);
 begin
   lbIEURL.Clear;
   EnumWindows(@GetUrlFromFirefox, LParam(lbIEURL.Items));
 end;
 
 end.

Última edición por dec fecha: 10-09-2005 a las 07:00:16. Razón: Encerrar el código fuente en la etiqueta [DELPHI]
Responder Con Cita