1.
(WebBrowser1.Document as IHtmlDocument2).DocumentHtml是全部
(WebBrowser1.Document as IHtmlDocument2).Body.OuterHtml是<body> ..</body>之间
2.
function EnumChildWindowsProc(hwnd: Integer; lparam: Longint): Boolean; stdcall;
var
buffer: array[0..255] of char;
begin
Result := True;
GetClassName(hwnd,buffer,256);
if StrPas(Buffer)='Edit' then
begin
SendMessage(hwnd,WM_GETTEXT,256,lparam);
Result:=False;
end;
end;
//SendMessage+WM_GETTEXT
procedure TForm1.Button1Click(Sender: TObject);
var
hwnd: Integer;
buffer: array[0..255] of char;
begin
hwnd := FindWindow('CabinetWClass',nil);
if hwnd< > 0 then
begin
EnumChildWindows(hwnd,@EnumChildWindowsProc,Integer(@buffer[0]));
Caption := StrPas(buffer);
end;
end;