Autor Beitrag
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Do 19.08.04 18:43 
Ich habe ein Programm geschrieben, dass mir die Caption der Statusbar vom IE ausliest und diese verarbeitet. Ich schaffe es aber nicht das ganze auch auf Mozilla, Opera und Netscape zu übertragen, kann mir da einer helfen?

Ich verwende momentan :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
function GetStatusText(wndWindow: THandle; 
  StatusBarClassName: string; 
  PanelIndex: Byte): string; 
var 
  WndStatusBar: THandle; 
  StatusBarText: array[0..$FFF] of Char; 
begin
  Result := ''; 
  WndStatusBar := FindWindowEx(wndWindow, 0, PChar(StatusBarClassName), nil); 
  if WndStatusBar <> 0 then 
  begin 
    if PanelIndex = 0 then 
      SendMessage(WndStatusBar, WM_GETTEXT, $FFF, Longint(@StatusBarText)) 
    else 
      SendMessage(WndStatusBar, SB_GETTEXT, PanelIndex, Longint(@StatusBarText));
    Result := StrPas(StatusBarText); 
  end; 
end;

procedure TForm1.Button1click(Sender: TObject);
var 
  barcaption : string;
begin

barcaption := GetStatusText(FindWindow('IEFrame', nil), 'msctls_statusbar32', 0);

end;

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?