[阅读: 266] 2005-06-24 06:58:31
procedure TfMain.FormCreate(Sender: TObject);
var
Cpc: IConnectionPointContainer;
Cp: IConnectionPoint;
Connection: Integer;
begin
Browser.Navigate('about:blank');
document := Browser.Document as IHTMLDocument2;
if Succeeded(document.QueryInterface(IConnectionPointContainer, CPC)) then
if Succeeded(CPC.FindConnectionPoint(DWebBrowserEvents2, CP)) then
CP.Advise(TSink.Create, Connection);
document.designMode := 'on';
end;
其中CPC.FindConnectionPoint(DWebBrowserEvents2, CP)一句取不到接口CP,难道不是DWebBroserEvents2,而是别的什么参数?
李战(leadzen)