Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.08.25;
Скачать: CL | DM;

Вниз

Интеграция с IE   Найти похожие ветки 

 
Checist [root]   (2003-08-13 22:03) [0]

Есть у меня соурс для определения адресса в панели адресса Ie, но чего - то он не пашет. Ошибок нет но работает неверно, точнее ничего не выдает. Подскажите где ошибка и как ее поправить!
[IE 6]

function TFMain.GetURL:string;
var
ie,toolbar,combo,
comboboxex,edit,
worker,toolbarwindow:hwnd;
begin
ie := FindWindow(pchar("IEFrame"),nil);
worker := FindWindowEx(ie,0,"WorkerA",nil);
toolbar := FindWindowEx(worker,0,"rebarwindow32",nil);
comboboxex := FindWindowEx(toolbar, 0, "comboboxex32", nil);
combo := FindWindowEx(comboboxex,0,"ComboBox",nil);
edit := FindWindowEx(combo,0,"Edit",nil);
toolbarwindow := FindWindowEx(comboboxex, 0, "toolbarwindow32",
nil);
result := GetText(edit);
end;

procedure TFMain.Button1Click(Sender: TObject);
begin
Edit1.Text := GetURL;
end;

function TFMain.GetText(WindowHandle: hwnd):string;
var
txtLength : integer;
buffer: string;
begin
TxtLength := SendMessage(WindowHandle, WM_GETTEXTLENGTH, 0, 0);
txtlength := txtlength + 1;
setlength (buffer, txtlength);
sendmessage (WindowHandle,wm_gettext, txtlength, longint(@buffer
[1]));
result := buffer;
end;

end.


 
Vulko ©   (2003-08-14 01:43) [1]


> ie := FindWindow(pchar("IEFrame"),nil);
> worker := FindWindowEx(ie,0,"WorkerA",nil);
> toolbar := FindWindowEx(worker,0,"rebarwindow32",nil);
> comboboxex := FindWindowEx(toolbar, 0, "comboboxex32", nil);
> combo := FindWindowEx(comboboxex,0,"ComboBox",nil);
> edit := FindWindowEx(combo,0,"Edit",nil);
> toolbarwindow := FindWindowEx(comboboxex, 0, "toolbarwindow32",
> nil);

А ты уверен, что названия такие?



Страницы: 1 вся ветка

Текущий архив: 2003.08.25;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.031 c
14-81870
И. О. Красной Майки
2003-07-31 23:18
2003.08.25
Встреча в Москве


1-81702
Yuliya
2003-08-11 09:49
2003.08.25
файл


14-81944
HolACost (*nickname*)
2003-08-06 18:48
2003.08.25
Про регистрацию левых логинов


9-81518
C-D
2003-02-23 17:50
2003.08.25
Нужен алгоритм поиска путей в графе...


14-81950
Licantrop
2003-08-06 08:36
2003.08.25
Eclipse?