๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Carlos Tue, 04 Dec 2007 11:32
CppWebBrowser Load from Stream .MHT file
#841
Author: Carlos
Date: Tue, 04 Dec 2007 11:32
8 lines
1070 bytes
Hello,

I am trying load a .MHT file from stream and it does not work.
If I load from file works well.

Any recomendations ?

Regards
Re: CppWebBrowser Load from Stream .MHT file
#842
Author: Asger Joergensen
Date: Tue, 04 Dec 2007 14:45
13 lines
1078 bytes
Hi Carlos 
 
 Carlos says:
> Hello,
> 
> I am trying load a .MHT file from stream and it does not work.
> If I load from file works well.

Could You show the code You are trying with ?

Kind regards
Asger
Re: CppWebBrowser Load from Stream .MHT file
#843
Author: Carlos
Date: Tue, 04 Dec 2007 15:28
39 lines
1927 bytes
Initialize:

wb->Navigate(
        WideString("about:blank"));

It code works for HTML but not for MHT.

TMemoryStream *stm = new TMemoryStream();
  Memo1->Lines->SaveToStream(stm);

  IPersistStreamInit *psi;
  stm->Seek(0,0);

  //if you pass soOwned instead, the stream will be freed for you
  TStreamAdapter *sa = new TStreamAdapter(stm,soReference);

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

  delete stm;



"Asger Joergensen" <junk@Asger-P.dk> escribiรณ en el mensaje de noticias 
news:MPG.21bf866ea99d5143989937@newsgroups.borland.com...
>
> Hi Carlos
>
> Carlos says:
>> Hello,
>>
>> I am trying load a .MHT file from stream and it does not work.
>> If I load from file works well.
>
> Could You show the code You are trying with ?
>
> Kind regards
> Asger 
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