Daryl
2008-02-12 20:24:21 UTC
Hi
I found this code in a post, Could someone convert this Delphi code to C++.
The end aim is to load a StringList with HTML script and use the lists
Stream method to load the HTML into the TWebBrowser. I would like to do
this so I do not have to first save the HTML to disk before using the
WebBrowsers' Navigate method. I am hoping this will do it for me - if I am
on the wrong path please let me know.
thanks
daryl
procedure LoadDocFromStream(WB: TWebBrowser; Stream: TStream);
begin
(WB.Document as IPersistStreamInit).Load(
TStreamAdapter.Create(Stream,soReference));
end;
I found this code in a post, Could someone convert this Delphi code to C++.
The end aim is to load a StringList with HTML script and use the lists
Stream method to load the HTML into the TWebBrowser. I would like to do
this so I do not have to first save the HTML to disk before using the
WebBrowsers' Navigate method. I am hoping this will do it for me - if I am
on the wrong path please let me know.
thanks
daryl
procedure LoadDocFromStream(WB: TWebBrowser; Stream: TStream);
begin
(WB.Document as IPersistStreamInit).Load(
TStreamAdapter.Create(Stream,soReference));
end;