🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages Started by lsllsf Sun, 25 Dec 2005 04:57
TCppWebBrowser load MHT doc from stream
#928
Author: lsllsf
Date: Sun, 25 Dec 2005 04:57
18 lines
1484 bytes
I can successfully load an html doc from a stream to TCppWebBrowser using
the code below, but when trying to load an .mht file, the formatting is all
screwed up. Anyone have any idea how to do this correctly? Thanks

ba

  TMemoryStream *stm = new TMemoryStream();
  Memo1->Lines->SaveToStream(stm);
  IPersistStreamInit *psi;
  stm->Seek(0,0);

 TStreamAdapter *sa = new TStreamAdapter(stm,soReference);

  if(SUCCEEDED(CppWebBrowser1->Document->QueryInterface(IID_IPersistStreamInit,(void
**)&psi)))
    psi->Load(*sa);

  delete stm;
Re: TCppWebBrowser load MHT doc from stream
#840
Author: caleb
Date: Fri, 30 Dec 2005 06:48
24 lines
1507 bytes
"lsllsf" <lsllsf@tom.com> wrote:
>I can successfully load an html doc from a stream to TCppWebBrowser using
>the code below, but when trying to load an .mht file, the formatting is all
>screwed up. Anyone have any idea how to do this correctly? Thanks
>
>ba
>
>  TMemoryStream *stm = new TMemoryStream();
>  Memo1->Lines->SaveToStream(stm);
>  IPersistStreamInit *psi;
>  stm->Seek(0,0);
>
> TStreamAdapter *sa = new TStreamAdapter(stm,soReference);
>
>  if(SUCCEEDED(CppWebBrowser1->Document->QueryInterface(IID_IPersistStreamInit,(void
>**)&psi)))
>    psi->Load(*sa);
>
>  delete stm;
>
>

Is memo1->wordwrap set to true?
Re: TCppWebBrowser load MHT doc from stream
#847
Author: lsllsf
Date: Sun, 01 Jan 2006 07:03
4 lines
1032 bytes
> Is memo1->wordwrap set to true?

  Email content is true!!! 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads